久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<legend id='gXzJH'><style id='gXzJH'><dir id='gXzJH'><q id='gXzJH'></q></dir></style></legend>
    <tfoot id='gXzJH'></tfoot>

    <small id='gXzJH'></small><noframes id='gXzJH'>

      <bdo id='gXzJH'></bdo><ul id='gXzJH'></ul>
    <i id='gXzJH'><tr id='gXzJH'><dt id='gXzJH'><q id='gXzJH'><span id='gXzJH'><b id='gXzJH'><form id='gXzJH'><ins id='gXzJH'></ins><ul id='gXzJH'></ul><sub id='gXzJH'></sub></form><legend id='gXzJH'></legend><bdo id='gXzJH'><pre id='gXzJH'><center id='gXzJH'></center></pre></bdo></b><th id='gXzJH'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='gXzJH'><tfoot id='gXzJH'></tfoot><dl id='gXzJH'><fieldset id='gXzJH'></fieldset></dl></div>

        如何關閉 AlertDialog.Builder?

        How to dismiss AlertDialog.Builder?(如何關閉 AlertDialog.Builder?)

        • <legend id='yGWwY'><style id='yGWwY'><dir id='yGWwY'><q id='yGWwY'></q></dir></style></legend>
        • <tfoot id='yGWwY'></tfoot>

            <bdo id='yGWwY'></bdo><ul id='yGWwY'></ul>
              <i id='yGWwY'><tr id='yGWwY'><dt id='yGWwY'><q id='yGWwY'><span id='yGWwY'><b id='yGWwY'><form id='yGWwY'><ins id='yGWwY'></ins><ul id='yGWwY'></ul><sub id='yGWwY'></sub></form><legend id='yGWwY'></legend><bdo id='yGWwY'><pre id='yGWwY'><center id='yGWwY'></center></pre></bdo></b><th id='yGWwY'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='yGWwY'><tfoot id='yGWwY'></tfoot><dl id='yGWwY'><fieldset id='yGWwY'></fieldset></dl></div>

              <small id='yGWwY'></small><noframes id='yGWwY'>

                  <tbody id='yGWwY'></tbody>

                  本文介紹了如何關閉 AlertDialog.Builder?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  在下面的代碼中,如何關閉警報框?我不想造成內存泄漏.我在alertDialog上嘗試了.dismiss(),但是沒有用...謝謝

                  In the following code below, how do I dismiss the alert box? I don't want to cause a memory leak. I tried the .dismiss() on alertDialog, but that didn't work... Thanks

                  // User pressed the stop button
                  public void StopMsg_button_action(View view){
                      final EditText password_input = new EditText(this); // create an text input field
                      password_input.setHint("Enter Password"); // put a hint in it
                      password_input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD); // change it to password type
                  
                      AlertDialog.Builder alertDialog = new Builder(this); // create an alert box
                      alertDialog.setTitle("Enter Password"); // set the title
                      alertDialog.setView(password_input);  // insert the password text field in the alert box
                      alertDialog.setPositiveButton("OK", new DialogInterface.OnClickListener() { // define the 'OK' button
                          public void onClick(DialogInterface dialog, int which) {
                               String entered_password = password_input.getText().toString();
                               if (entered_password.equals(my_password)) {
                                  locManager.removeUpdates(locListener); // stop listening for GPS coordinates
                                  startActivity(new Intent(Emergency_1Activity.this,Main_MenuActivity.class)); // go to main menu
                               } else {
                                   alert("Incorrect Password");
                               }
                          } 
                      });
                      alertDialog.setNeutralButton("Cancel", new DialogInterface.OnClickListener() { // define the 'Cancel' button
                          public void onClick(DialogInterface dialog, int which) {
                  
                          } 
                      });
                      alertDialog.show(); // show the alert box
                  }
                  

                  推薦答案

                  dismiss() 有什么問題?

                  What didn't work about dismiss()?

                  您應該可以使用 Dialog.dismiss(),或 Dialog.cancel()

                  You should be able to use either Dialog.dismiss(), or Dialog.cancel()

                  alertDialog.setNeutralButton("Cancel", new DialogInterface.OnClickListener() { // define the 'Cancel' button
                      public void onClick(DialogInterface dialog, int which) {
                          //Either of the following two lines should work.
                          dialog.cancel();
                          //dialog.dismiss();
                      } 
                  });
                  

                  這篇關于如何關閉 AlertDialog.Builder?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯(lián)網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Get user#39;s current location using GPS(使用 GPS 獲取用戶的當前位置)
                  IllegalArgumentException thrown by requestLocationUpdate()(requestLocationUpdate() 拋出的 IllegalArgumentException)
                  How reliable is LocationManager#39;s getLastKnownLocation and how often is it updated?(LocationManager 的 getLastKnownLocation 有多可靠,多久更新一次?)
                  How to detect Location Provider ? GPS or Network Provider(如何檢測位置提供者?GPS 或網絡提供商)
                  Get current location during app launch(在應用啟動期間獲取當前位置)
                  locationManager.getLastKnownLocation() return null(locationManager.getLastKnownLocation() 返回 null)
                    <tbody id='KEfQu'></tbody>

                        • <bdo id='KEfQu'></bdo><ul id='KEfQu'></ul>
                          <legend id='KEfQu'><style id='KEfQu'><dir id='KEfQu'><q id='KEfQu'></q></dir></style></legend>

                          <small id='KEfQu'></small><noframes id='KEfQu'>

                            <i id='KEfQu'><tr id='KEfQu'><dt id='KEfQu'><q id='KEfQu'><span id='KEfQu'><b id='KEfQu'><form id='KEfQu'><ins id='KEfQu'></ins><ul id='KEfQu'></ul><sub id='KEfQu'></sub></form><legend id='KEfQu'></legend><bdo id='KEfQu'><pre id='KEfQu'><center id='KEfQu'></center></pre></bdo></b><th id='KEfQu'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='KEfQu'><tfoot id='KEfQu'></tfoot><dl id='KEfQu'><fieldset id='KEfQu'></fieldset></dl></div>
                            <tfoot id='KEfQu'></tfoot>
                            主站蜘蛛池模板: 日韩在线欧美 | 一级看片免费视频 | tube国产| 精品综合 | 成人午夜影院 | 亚洲欧美日韩精品久久亚洲区 | 日日夜夜天天干 | 美女131mm久久爽爽免费 | 碰碰视频 | 久久久久久亚洲精品 | 狠狠干狠狠操 | 亚洲国产aⅴ精品 | 成人在线视频免费观看 | 久久精品这里精品 | 羞羞视频在线观看网站 | 中文字幕一区二区三区精彩视频 | 午夜视频在线免费观看 | 久久人| av电影一区 | 国产一区二区小视频 | 久久黄色网 | 午夜视频在线观看一区二区 | 我我色综合 | 国产区在线观看 | 五月激情婷婷六月 | 精品亚洲永久免费精品 | 黑人巨大精品欧美黑白配亚洲 | 99色在线视频 | 日韩在线成人 | 91中文字幕在线 | 国产一区亚洲二区三区 | 午夜日韩 | 永久av| 精品久久国产 | 成人精品一区二区三区中文字幕 | 国产精品18hdxxxⅹ在线 | 精品国产一区二区三区久久狼黑人 | 国产黄色在线观看 | 日韩综合在线视频 | 久久高清亚洲 | 中文字幕一区在线观看视频 |