I want to show ProgressDialog but ProgressDialog never really rendered ! And I want to end this process to start next state. this is my code:
ProgressDialog waitProgressDialog = new ProgressDialog(getContext());
waitProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
waitProgressDialog.setMessage("please wait..");
waitProgressDialog.setOnShowListener(new OnShowListener() {
@Override
public void onShow(DialogInterface dialog) {
ExirDebugger.println("----------TEST999999 START");
///same sqlit datasouce select
ExirDebugger.println("----------TEST999999 END");
}
});
waitProgressDialog.show();
android not render anything while all work end! can anyone help me?
I use
ProgressDialog dialog = ProgressDialog.show(className.this, "", "Loading. Please wait...", true);
//Do stuff
dialog.dismiss();
来源:https://stackoverflow.com/questions/17851343/how-can-really-show-progressdialog-while-waiting-for-end-process