Android display progress dialog in front of alert dialog -


i have problem progress dialog asynctask. here's scenario. have app has alert dialog, checks db. if result true call asynctask displays progress dialog. progress dialog displaying behind alert dialog. how can display progress dialog in front of alert dialog?

asynctask:

protected void onpreexecute() {         super.onpreexecute();         pdialog = new progressdialog(readbibleactivity.this);         pdialog.setmessage(getresources().getstring(r.string.translating_bible_version));         pdialog.setindeterminate(true);         pdialog.setprogressstyle(progressdialog.style_spinner);         pdialog.setcancelable(false);         pdialog.show();     } 

alert dialog:

private void displaydialog() {     customdialog = new dialog(this);     customdialog.settitle(getresources().getstring(r.string.share));     customdialog.setcontentview(r.layout.dialog);      ettitle = (edittext) customdialog.findviewbyid(r.id.ettitle);     etdescription = (edittext) customdialog.findviewbyid(r.id.etdescription);      if(caller == 1) {          string userversion = dbhelper.getuserversion(userid);          if((userversion != null && !userversion.isempty())                 && !userversion.equalsignorecase("tlc")) {              if(connectiondetector.hasnetworkconnection(this)) {                 scrapetask = new scrapeasynctask();                 scrapetask.execute();             } else {                 toast.maketext(this,                         getresources().getstring(r.string.no_internet_connection),                         toast.length_short).show();             }          } else {             ettitle.setkeylistener(null);             ettitle.settext(verse);             etdescription.settext("\"" + text + "\"");             etdescription.requestfocus();         }      } else {         ettitle.sethint(text);         ettitle.requestfocus();         etdescription.sethint(text);     }      customdialog.show(); } 

any ideas? appreciated. thanks!

try calling customdialog.show();

before scrapetask = new scrapeasynctask();


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -