Android close dialog after 5 seconds?

后端 未结 8 849
北海茫月
北海茫月 2020-12-05 02:00

I\'m working on an accesibility app. When the user wants to leave the app I show a dialog where he has to confirm he wants to leave, if he doesn\'t confirm after 5 seconds t

8条回答
  •  误落风尘
    2020-12-05 02:59

    AlertDialog alertDialog = new AlertDialog.Builder(MainActivity.this).create();
    

    then call dismiss meth it work

    alertDialog .dismiss(); 
    

提交回复
热议问题