I have a algorithm that need about 4-5 sec to get all the contacts from sim and bind them in my autocompletetextview (which happens in onCreate) so while that happens how can i create a dialog that will show like loaing and percentage or a progress bar… pls some reference or help:D
Share
you have to used the ProgressDialog:
http://developer.android.com/reference/android/app/ProgressDialog.html
It can show a indeterminate progress bar or a percentage. To update the percentage bar, you’d possibly need to use the class AsyncTask.
I put a link which shows the two classes working together:
http://sites.google.com/site/androidhowto/how-to-1/asynctasks-with-progressdialogs
I’m adding a more useful link:
http://www.codeproject.com/Articles/162201/Painless-AsyncTask-and-ProgressDialog-Usage