久久久久久久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>

        如何關(guān)閉 AlertDialog.Builder?

        How to dismiss AlertDialog.Builder?(如何關(guān)閉 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>

                  本文介紹了如何關(guān)閉 AlertDialog.Builder?的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  在下面的代碼中,如何關(guān)閉警報(bào)框?我不想造成內(nèi)存泄漏.我在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()?

                  您應(yīng)該可以使用 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();
                      } 
                  });
                  

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

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

                  相關(guān)文檔推薦

                  Get user#39;s current location using GPS(使用 GPS 獲取用戶的當(dāng)前位置)
                  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(如何檢測(cè)位置提供者?GPS 或網(wǎng)絡(luò)提供商)
                  Get current location during app launch(在應(yīng)用啟動(dòng)期間獲取當(dāng)前位置)
                  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>
                            主站蜘蛛池模板: 91免费观看视频 | 一区二区三区国产好的精 | 国产精品一区二区久久久久 | 黑人巨大精品欧美一区二区免费 | 免费人成激情视频在线观看冫 | 在线免费观看欧美 | 欧美久久久网站 | 国产视频一二三区 | 一级欧美 | 久久久网| 精品一二三区视频 | 在线一区视频 | 特黄特黄a级毛片免费专区 av网站免费在线观看 | 欧美一级淫片免费视频黄 | 国产二区在线播放 | 国产片侵犯亲女视频播放 | 亚洲欧美一区二区三区1000 | 在线亚洲一区二区 | 免费在线观看av网站 | 日韩国产一区二区三区 | 日日操网站 | 99福利视频 | av一区二区三区 | 97精品国产97久久久久久免费 | 日本a∨精品中文字幕在线 亚洲91视频 | 亚洲欧美中文字幕在线观看 | 国产精品一区二区久久久久 | 国产精品高清一区二区三区 | 亚洲v日韩v综合v精品v | av大全在线观看 | 欧美精品一区三区 | 日本成人在线免费视频 | 久久69精品久久久久久久电影好 | 7777精品伊人久久精品影视 | 91在线电影| 亚洲人久久 | 国产精品色一区二区三区 | 91精品国产一区二区三区 | 成人免费大片黄在线播放 | 日韩一区二区在线视频 | 中文字幕在线视频免费观看 |