You can use the undefined ProgressBar for a looping effect. Here's how you do it in XML:
<ProgressBar android:indeterminate="true" android:layout_width="50dp" android:layout_height="50dp" android:id="@+id/marker_progress" style="?android:attr/progressBarStyle" android:layout_gravity="center_vertical|center_horizontal"/>
You can change the height and width as you want. When you are finished loading, you can change its visibility to View.INVISIBLE or View.GONE
Abhinav Mar 10 2018-11-11T00: 00Z
source share