public class

FioriProgressBar

extends ProgressBar
java.lang.Object
   ↳ android.view.View
     ↳ android.widget.ProgressBar
       ↳ com.sap.cloud.mobile.fiori.indicator.FioriProgressBar

Class Overview

A Fiori based user interface element that indicates the progress of an operation. Progress bar supports two modes to represent progress: determinate, and indeterminate. For a visual overview of the difference between determinate and indeterminate progress modes, see Progress & activity. Display progress bars to a user in a non-interruptive way. Show the progress bar in your app's user interface or in a notification instead of within a dialog.

Indeterminate Progress

Use indeterminate mode for the progress bar when you do not know how long an operation will take. Indeterminate mode is the default for progress bar and shows a cyclic animation without a specific amount of progress indicated. The following example shows an indeterminate progress bar:

 <com.sap.cloud.mobile.fiori.indicator.FioriProgressBar
      android:id="@+id/indeterminateBar"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      />
 

Determinate Progress

Use determinate mode for the progress bar when you want to show that a specific quantity of progress has occurred. For example, the percent remaining of a file being retrieved, the amount records in a batch written to database, or the percent remaining of an audio file that is playing.

To indicate determinate progress, you set the style of the progress bar to FioriProgressbar_Horizontal and set the amount of progress. The following example shows a determinate progress bar that is 25% complete:

 <com.sap.cloud.mobile.fiori.indicator.FioriProgressBar
      android:id="@+id/determinateBar"
      style="@style/Progressbar_Horizontal"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:progress="25"/>
 
You can update the percentage of progress displayed by using the setProgress(int) method, or by calling incrementProgressBy(int) to increase the current progress completed by a specified amount. By default, the progress bar is full when the progress value reaches 100. You can adjust this default by setting the progressbar_max.

Other progress bar styles provided by the system include:

XML attributes

See ProgressBar Attributes, View Attributes

Summary

XML Attributes
Attribute Name Related Method Description
FioriProgressBar_type  
[Expand]
Inherited Constants
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
FioriProgressBar(Context context)
FioriProgressBar(Context context, AttributeSet attrs)
FioriProgressBar(Context context, AttributeSet attrs, int defStyleAttr)
FioriProgressBar(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Public Methods
boolean isQueryDeterminate()
Indicate id the query indeterminate determinate progressbar is in determinate state
boolean isQueryIndeterminate()
Indicate id the query indeterminate determinate progressbar is in indeterminate state
void setBackground(Drawable background)
synchronized void setIndeterminate(boolean indeterminate)
Protected Methods
synchronized void onDraw(Canvas canvas)
void onSizeChanged(int w, int h, int oldw, int oldh)
[Expand]
Inherited Methods
From class android.widget.ProgressBar
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource

XML Attributes

FioriProgressBar_type

Related Methods

Public Constructors

public FioriProgressBar (Context context)

public FioriProgressBar (Context context, AttributeSet attrs)

public FioriProgressBar (Context context, AttributeSet attrs, int defStyleAttr)

public FioriProgressBar (Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

Public Methods

public boolean isQueryDeterminate ()

Indicate id the query indeterminate determinate progressbar is in determinate state

Returns
  • boolean

public boolean isQueryIndeterminate ()

Indicate id the query indeterminate determinate progressbar is in indeterminate state

Returns
  • boolean

public void setBackground (Drawable background)

public synchronized void setIndeterminate (boolean indeterminate)

Protected Methods

protected synchronized void onDraw (Canvas canvas)

protected void onSizeChanged (int w, int h, int oldw, int oldh)