MAFTextView

The MAFTextView control extends the capabilities of the android.widget.TextView native control. MAF adds styling capabilities to the TextView UI component, and provides predefined size variations, such as small and normal labels.

To create and present a default SAP style instance of MAFTextView , use:
		// normal label
		MAFTextView nLabel = new MAFTextView(this);
		LinearLayout.LayoutParams nl_lps = new LinearLayout.LayoutParams(0, 
LinearLayout.LayoutParams.WRAP_CONTENT, 1f);
		nLabel.setLayoutParams(nl_lps);
		nLabel.setText("NORMAL");
		nLabel.setFocusable(true);
		labelRow.addView(nLabel);
To create an MAFTextView in the Android layout XML, use:
    <com.sap.maf.uicontrols.view.MAFTextView
        android:id="@+id/maflabel"
        android:layout_width="wrap_content"
        android:layout_height="50dip"
        android:text="skinned label" />

The MAF skinning engine customizes the text views. To apply SAP style, set the custom style for background, foreground, shadow, font family, and font size in the XML file.

This is the XAML content for the default style of the Label TargetType:
<Style TargetType="Label" Key="DefLabel" platform="android">
		<Setter Property="Foreground" Value="#ff333333" />
		<!-- text color -->
		<Setter Property="FontFamily" Value="sans_serif" />
		<!-- font size -->
		<Setter Property="FontSize" Value="18" />
		<!-- font style -->
	</Style>
You can set different sizes for the MAFTextView programmatically.  To create a small-sized standard text view, use:
MAFTextView sLabel = new MAFTextView(this, "SmallLabel");
You can also inherit the style definition from the standard TextView and create a flavored TextView. This is an example for a large text view:
	<Style TargetType="Label" Key="LargeLabel" BasedOn="DefLabel" platform="android">
		<Setter Property="FontSize" Value="22" />
		<Setter Property="Foreground" Value="#ff333333" />
	</Style>
To create a text view from code, use:
MAFTextView Label = new MAFTextView(this, "LargeLabel");
You can change these properties in the skinning XML:
Foreground Control's text color.
FontFamily Control's font family.
FontSize Control's font size.