Developer

Week View

MAFCalendarWeekView is skinnable UI component with backward and forward navigation buttons for previous and next weeks, respectively.

To create and present a default SAP style instance of MAFCalendarWeekView, use this code:
MAFCalendarWeekView weekView = new MAFCalendarWeekView(this,null);
To create an MAFCalendarWeekView in the Android layout XML, use:
    <com.sap.maf.uicontrols.calendar.weekview.MAFCalendarWeekView
        android:id="@+id/weekview"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
    />
The MAF skinning engine customizes MAFCalendarWeekView. To apply SAP style, set the custom style in the XML file for background, foreground, shadow, font family, and font size. This is the XAML content for the default style of the CalendarWeekView TargetType:
<Style TargetType="CalendarDayView" Key="CalendarWeekView" BasedOn="DefCalendarDayView" platform="android">
		<Setter Property="Panel_Background" Value="#ffffffff" />
		<Setter Property="Header_Background" Value="#ffebf2f8" />
		<Setter Property="Week_Label_Color" Value="#ff595959" />
		<Setter Property="Day_Label_Color" Value="#ff0059a3" />
		<Setter Property="Month_Label_Color" Value="#ff161210" />
		<Setter Property="DOW_Label_Color" Value="#ff267cb7" />
		<Setter Property="Def_Appo_Color" Value="#ff55ff55" />
		<Setter Property="Def_Appo_Bg_Color" Value="#ff55ff55" />
		<Setter Property="Panel_Line_Color" Value="#ff888888" />
		<Setter Property="Panel_Text_Color" Value="#ff333333" />
		<Setter Property="Current_Time_Line_Color" Value="#ffff0000" />
	</Style>
You can also inherit the style definition from the standard week view and create a flavored version. Here is an example for a red week view flavor:
	<Style TargetType="CalendarDayView" Key="RedWeekView" BasedOn="DefCalendarDayView" platform="android">
		<Setter Property="Panel_Background" Value="#ffff0000" />
		<Setter Property="Header_Background" Value="#ffeb0000" />
		<Setter Property="Week_Label_Color" Value="#ff595959" />
		<Setter Property="Day_Label_Color" Value="#ff0059a3" />
		<Setter Property="Month_Label_Color" Value="#ff161210" />
		<Setter Property="DOW_Label_Color" Value="#ff267cb7" />
		<Setter Property="Def_Appo_Color" Value="#ff55ff55" />
		<Setter Property="Def_Appo_Bg_Color" Value="#ff55ff55" />
		<Setter Property="Panel_Line_Color" Value="#ff888888" />
		<Setter Property="Panel_Text_Color" Value="#ff333333" />
		<Setter Property="Current_Time_Line_Color" Value="#ff00ff00" />
	</Style>
To create a flavored week view from code, use:
MAFCalendarWeekView weekView = new MAFCalendarWeekView(this,null);
To create a flavored week view in the layout XML, use:
    <com.sap.maf.uicontrols.calendar.weekview.MAFCalendarWeekView
        android:id="@+id/weekview"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        x:flavor=”RedWeekView”
    />
You can change these properties in the skinning XML:
Panel_Background Color of the MAFCalendarWeekView’s daypanel background; can also be a freestyle gradient. Colors are defined as RGBA (red, green, blue, alpha).
Header_Background The color of the control's header background.
Week_Label_Color The color of the control's week label.
Day_Label_Color The color of the day label.
Month_Label_Color The color of the month label.
DOW_Label_Color Day of week label color.
Def_Appo_Color Default appointment color.
Def_Appo_Bg_Color Default appointment backgorund color.