How to Prevent an Alert Dialog Getting Closed by Back Button

后端 未结 3 2068
一个人的身影
一个人的身影 2021-02-12 19:19

I have an alert dialog like this:

    AlertDialog.Builder oyunaBaslaDialog = new AlertDialog.Builder(this);
    oyunaBaslaDialog.setMessage(\"A Takımı\");
    oy         


        
3条回答
  •  广开言路
    2021-02-12 20:10

    there is a method called, bulder.setCancelable().by default this cancelable set 'true'.override it with,

    bulder.setCancelable(false)
    

提交回复
热议问题