I have created progress dialog like this
public VolleyService(Context context, VolleyServiceCompletedListener listener){
this.context = context;
pDialog = new ProgressDialog(context);
pDialog.setMessage("Loading...");
pDialog.setCancelable(false);
this.listener = listener;
}
and tried to show progress dialog using this method.
private void showProgressDialog() {
boolean isShowing = pDialog.isShowing();
if (!isShowing)
pDialog.show();
}
And hide the dialog using this method.
private void hideProgressDialog() {
if (pDialog.isShowing()) {
pDialog.hide();
}
}
The problem is pDialog.isShowing()
returns true even after I have called the pDialog.hide()
. When I see the hide()
method from android.app.Dialog.java
they didn't assign the mShowing
variable as false, but when I call show()
they assigned the mShowing
variable as true.
So is there any reason behind they didn't make as false? And how can I open the same progress dialog again?