I can’t make my ProgressDialog show up and I’m not sure why?
The Code:
public class Activity001 extends Activity implements OnClickListener
{
public void onClick(View view)
{
ProgressDialog progressDialog = ProgressDialog.show(Activity001.this, "", "wait ", true, false);
// Sending some files to server .. takes time .. - (method that take 1-2 minutes )
progressDialog.dismiss();
}
}
Can anyone give me a hand?
Try this.,
Do this in your onCreate()
And now use a thread to upload files to server. Modify this piece of code,
EDIT
Progress dialog is a light weight object. It does’t take priority over other tasks that happens in a main Thread. For example when you call a progress dialog’s show() followed by a http process or something like that in the main thread, it will not allow the light weighted prgoress dialog to take priority. So obviously it will just show up at the end of the http process.