There are two other ways to display an activity indicator without using the modal ProgressDialog.
You can use ImageView in your layout and apply animation to it. Refer to the developer's site .
public void startAnimation() {
Or you can use xml-drawable to describe a background image that will have some kind of spinning animation:
First, we describe drawable (in ie / res / drawable / my-indicator.xml)
<animated-rotate xmlns:android="http://schemas.android.com/apk/res/android" android:drawable="@drawable/spinner_black_76" android:pivotX="50%" android:pivotY="50%" android:framesCount="12" android:frameDuration="100" />
Then set it against the background of some kind
Olegas Feb 17 2018-11-11T00: 00Z
source share