I need progress circle icons for android apps

Asked By 7060 points N/A Posted on -

Hi programmers,

I am developing an Android app for smart phone. I need some help from Android developers. I wish to display  progress circle icons when my apps are busy or uploading some information. May I need to create animation or  Xml file for it? Can someone provide me the edit able code for this purpose?  Please share your ideas and tips.


Answered By 0 points N/A #198778

I need progress circle icons for android apps



Rather than using XML, I would suggest using Java code because, suitable to your problem, there are plenty of examples that make use of the AsynchTask class. 
Here is the generic for that class: AsyncTask<Void,Vois,Void>
You could override a method named "onPostExecute" such that it could stop the spinner. Below is an example code of that method.
protected void onPostExecute(Void result) {         
    //perform action as per response
          //message describing success
        }else if(response.equals("failure"))
          //message describing failure
        }else {
         // display connectivity error
Also, you need to override the onPreExecute and doInBackground methods.
progDialog is an instance of ProgressDiaglog which must be initialized within onPreExecute. 
For more information, please visit https://stackoverflow.com/
Best Regards,

Login/Register to Answer

Related Questions