Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Activity Indicator?

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?.

like image 721
Sanal MS Avatar asked Feb 17 '11 06:02

Sanal MS


People also ask

What is the use of activity indicator?

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 .


2 Answers

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.

like image 59
Martin Belcher - AtWrk Avatar answered Oct 06 '22 22:10

Martin Belcher - AtWrk


do some thing like this

ProgressDialog mDialog = new ProgressDialog(getApplicationContext());             mDialog.setMessage("Please wait...");             mDialog.setCancelable(false);             mDialog.show(); 
like image 34
ingsaurabh Avatar answered Oct 06 '22 22:10

ingsaurabh