How can i show an Activity Indicator in Android? Is there any Android Library given method? If no, please let me know the techniques used to show activity indicator in Android?.
Activity Indicator The ActivityIndicator represents a UI widget which displays a progress indicator hinting the user for some background operation running like loading image, data, accepting a request, etc. We can control its behavior by setting or binding to its boolean property busy .
The most direct equivalent of the iOS Activity Indicator in Android is the ProgressBar
but set to indeterminate. So you can drop the view into your layout and it will provide you with a spinning animation.
<ProgressBar android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/ctrlActivityIndicator" android:indeterminateOnly="true" android:keepScreenOn="true" />
You could use this to indicate some background activity to the user.
do some thing like this
ProgressDialog mDialog = new ProgressDialog(getApplicationContext()); mDialog.setMessage("Please wait..."); mDialog.setCancelable(false); mDialog.show();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With