Android ProgressBar

There are two main types of ProgressBar in Android:

  1. Horizontal ProgressBar:
  2. Circular ProgressBar:
                                    
                                            <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".ProgressBarExample"
        android:gravity="center"
        android:orientation="vertical"
        android:padding="16dp">
   
       <TextView
           android:id="@+id/text"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:text="Click on start button"
           android:layout_marginBottom="20dp"/>
   
        <ProgressBar
           android:id="@+id/progress"
           android:layout_width="match_parent"
           android:layout_height="wrap_content"
           android:layout_marginBottom="24dp"
           style="@style/Widget.AppCompat.ProgressBar.Horizontal"
           android:max="100"
           />
   
        <Button
           android:id="@+id/start"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:text="Start"
           android:textColor="@color/colorWhite"
           android:background="@color/colorOrange"
           />
   
</LinearLayout>
                                    
                                  

Output