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

To create and present a default SAP style instance of MAFProgressBar, use:
ProgressBar pb = MAFUIFactory.getInstance().getProgressBar(this, 
To create an MAFProgressBar in the Android layout XML, use:

The MAF skinning engine customizes the ProgressBar. To apply SAP style, set the custom style for background, foreground, and solid color brush in the XML file.

This is the XAML content for the default style of the ProgressBar TargetType:
        <Style TargetType="ProgressBar" Key="DefProgressBar" platform="android">
                 <Setter Property="Background" Value="#80DDDDDD" />
                 <!-- background color -->
                 <Setter Property="Foreground" Value="#ff0062a9" />
                 <!-- progress color -->
                 <Setter Property="SolidColorBrush" Value="#8000a3d7" />
                 <!-- secondary progress color -->
           </ Style > 
You can also inherit the style definition from the standard ProgressBar and create a flavored ProgressBar. Here is an example for a red styled ProgressBar flavor:
        <Style TargetType="ProgressBar" Key="RedProgressBar" BasedOn="DefProgressBar" 
                 <Setter Property="Background" Value="#000099" />
                 <!-- background color -->
                 <Setter Property="Foreground" Value="#ff0000" />
                 <!-- progress color -->
                 <Setter Property="SolidColorBrush" Value="#003333" />
                 <!-- secondary progress color -->
           </ Style > 
To create a ProgressBar from code, use:
MAFProgressBar pb = new MAFProgressBar(context, android.R.attr.progressBarStyle,
You can change these properties in the skinning XML:
Background Color of the MAFProgressBar’s background; Colors are defined as RGBA (red, green, blue, alpha).
Foreground Control's progress color.
SolidColorBrush Control's secondary progress color.