I want to creeate dialog for temporary time(Say After Few Seconds It should get cancelled Automatically).
I create dialog with this code :
Dialog dl=new Dialog(myclass.this);
dl.setTitle("HELLE WORLD");
dl.setCanceledOnTouchOutside(true);
dl.show();
And I finish dialog with this : dl.cancel();
But when write this ? (for example I finish dialog 5 sn after.)
ok create a dialog as usual and start a countdown timer of say 5 sec, as the countdown timer expires in
onFinishusedialog.dismiss()to stop it after certain time.Like this,
For More Detail Go to This Link