Pre Exam Test Practice (SSC | Banking | IAS | GATE | State Level | CLAT | Railways | Insurance | Teaching Exams | NDA | Defence | IES |State Exam )

Organizational Research By

Surprising Reserch Topic questions - Question:Using ProgressDialog in ActionBar (Android)

I am trying to move a ProgressDialog to my ActionBar.

I know how to put it in the action bar and animate it (I think), like this:

In progress.xml"
    android:weightSum="1" >

        android:layout_height="wrap_content" >

in menu.xml


in my activity

        return true;

Here is my current PD (in the activity) in onPreExecute and onPostExecute of my AsyncTask:

// Pre  
dialog = new MyProgressDialog(---.this);;

// Post    

So how do I move this so that the action bar indicator is activated in onPreExecute and then stopped in onPostExecute?

EDIT: I am not only looking for a refresh, but a "loading" indicator when you first load an activity (or do something that requires the PD to activate). It should be hidden by default.

asked Sep 13, 2013 in ANDROID by rajesh
edited Sep 12, 2013
0 votes

Related Hot Questions

Government Jobs Opening