Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

FabProgress

IGR777 edited this page Aug 30, 2018 · 7 revisions

Round button which has progress functionality. Doesn't use classic FAB concept, despite it's naming.

FabProgress inherits from AppCompatImageButton/UIButton.

Customization fields

UIImage Drawable Image - icon, which will be displayed on FabProgress button.

UIImage Drawable PreloaderImage - icon, which will be displayed on FabProgress button, after user tapped it.

UIColor Color BackgroundColor - is new property for Android platform and overridden property for IOS platform. Responsible for button's background color in normal state.

UIColor Color DisabledBackgroundColor - responsible for button's background color in disabled state.

UIColor Color PressedBackgroundColor - responsible for button's background color in pressed state.

ShadowConfig ShadowConfig - this property responsible for button's shadow configuration.

bool InProgress - shows status of the control.

Usage

Android

For Android platform there are two ways to add FabProgress to the layout: to the axml markup file or to the code behind.

Sample for creating FabProgress in axml markup for Android:

<EOS.UI.Droid.Controls.FabProgress
    android:id="@+id/fabProgress"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"/>

Sample of customization FabProgress in code behind for Android:

var fabProgress = new FabProgress(Context);
fabProgress.BackgroundColor = Color.Orange;
fabProgress.DisabledBackgroundColor = Color.LightGray;
fabProgress.PressedBackgroundColor = Color.Blue;
fabProgress.Image = Resources.GetDrawable(Resource.Drawable.icFabProgress);
fabProgress.PreloaderImage = Resources.GetDrawable(Resource.Drawable.icPreload);

iOS

For iOS FabProgress can be added from the .xib/storyboards files or from code behind.

The sample for creating FabProgress in code behind for IOS:

var fabProgress = new FabProgress();
fabProgress.BackgroundColor = UIColor.Orange;
fabProgress.DisabledBackgroundColor = UIColor.LightGray;
fabProgress.PressedBackgroundColor = UIColor.Blue;
fabProgress.Image = UIImage.FromBundle("fabIcon");
fabProgress.PreloaderImage = UIImage.FromBundle("preloaderImage");
Clone this wiki locally