I have a a class that that is extended with Dialog itself. There are certain options available in dialog that sends request to server. I want to show a progress wait dialog when user click on any such option.
but Dialog in not showing may be because I am showing a progress dialog inside a dialog.
code is really very simple.
public class LeaderBoard extends Dialog implements View.OnClickListener {
public LeaderBoard(Context context) {
super(context, android.R.style.Theme_Black_NoTitleBar_Fullscreen);
this.mContext = context;
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.leaderboard);
public void onClick(View paramView) {
..............
if (this.waitDialog != null) {
this.waitDialog.show();
}
new Runnable() {
@Override
public void run() {
mHandler.post(new Runnable() {
@Override
public void run() {
send request to server
waitDialog.dismiss();
}
});
}
}.run();
Hi Please try below code.
Thanks,
Nik…