pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

<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="55r5jrf" 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="zflj7vz" 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模板網!

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

                  相關文檔推薦

                  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="ptnbxln" id='KEfQu'><tfoot id='KEfQu'></tfoot><dl id='KEfQu'><fieldset id='KEfQu'></fieldset></dl></div>
                            <tfoot id='KEfQu'></tfoot>
                            主站蜘蛛池模板: 天津货架厂_穿梭车货架_重型仓储货架_阁楼货架定制-天津钢力仓储货架生产厂家_天津钢力智能仓储装备 | SRRC认证|CCC认证|CTA申请_IMEI|MAC地址注册-英利检测 | 天津散热器_天津暖气片_天津安尼威尔散热器制造有限公司 | 硬齿面减速机_厂家-山东安吉富传动设备股份有限公司 | 河南中整光饰机械有限公司-抛光机,去毛刺抛光机,精密镜面抛光机,全自动抛光机械设备 | 仓储笼_仓储货架_南京货架_仓储货架厂家_南京货架价格低-南京一品仓储设备制造公司 | 山东钢衬塑罐_管道_反应釜厂家-淄博富邦滚塑防腐设备科技有限公司 | Honsberg流量计-Greisinger真空表-气压计-上海欧臻机电设备有限公司 | 耐磨陶瓷,耐磨陶瓷管道_厂家-淄博拓创陶瓷科技 | 上海律师事务所_上海刑事律师免费咨询平台-煊宏律师事务所 | 微学堂-电动能源汽车评测_电动车性能分享网 | 热风机_工业热风机生产厂家上海冠顶公司提供专业热风机图片价格实惠 | 房在线-免费房产管理系统软件-二手房中介房屋房源管理系统软件 | 济南品牌设计-济南品牌策划-即合品牌策划设计-山东即合官网 | 地埋式垃圾站厂家【佳星环保】小区压缩垃圾中转站转运站 | 篮球架_乒乓球台_足球门_校园_竞技体育器材_厂家_价格-沧州浩然体育器材有限公司 | 铝板冲孔网,不锈钢冲孔网,圆孔冲孔网板,鳄鱼嘴-鱼眼防滑板,盾构走道板-江拓数控冲孔网厂-河北江拓丝网有限公司 | 【连江县榕彩涂料有限公司】官方网站 | ph计,实验室ph计,台式ph计,实验室酸度计,台式酸度计 | TPE塑胶原料-PPA|杜邦pom工程塑料、PPSU|PCTG材料、PC/PBT价格-悦诚塑胶 | 早报网 | 免费分销系统 — 分销商城系统_分销小程序开发 -【微商来】 | 继电器模组-IO端子台-plc连接线-省配线模组厂家-世麦德 | 刑事律师_深圳著名刑事辩护律师_王平聚【清华博士|刑法教授】 | 对照品_中药对照品_标准品_对照药材_「格利普」高纯中药标准品厂家-成都格利普生物科技有限公司 澳门精准正版免费大全,2025新澳门全年免费,新澳天天开奖免费资料大全最新,新澳2025今晚开奖资料,新澳马今天最快最新图库 | 凝胶成像仪,化学发光凝胶成像系统,凝胶成像分析系统-上海培清科技有限公司 | ERP企业管理系统永久免费版_在线ERP系统_OA办公_云版软件官网 | 步进_伺服_行星减速机,微型直流电机,大功率直流电机-淄博冠意传动机械 | 深圳快餐店设计-餐饮设计公司-餐饮空间品牌全案设计-深圳市勤蜂装饰工程 | 污水处理设备,一体化泵站,一体化净水设备-「梦之洁环保设备厂家」 | 水篦子|雨篦子|镀锌格栅雨水篦子|不锈钢排水篦子|地下车库水箅子—安平县云航丝网制品厂 | 滑板场地施工_极限运动场地设计_滑板公园建造_盐城天人极限运动场地建设有限公司 | 广东机电安装工程_中央空调工程_东莞装饰装修-广东粤标建设有限公司 | 深圳货架厂家_金丽声精品货架_广东金丽声展示设备有限公司官网 | 工业淬火油烟净化器,北京油烟净化器厂家,热处理油烟净化器-北京众鑫百科 | 滚塑PE壳体-PE塑料浮球-警示PE浮筒-宁波君益塑业有限公司 | 无锡装修装潢公司,口碑好的装饰装修公司-无锡索美装饰设计工程有限公司 | 彭世修脚_修脚加盟_彭世修脚加盟_彭世足疗加盟_足疗加盟连锁_彭世修脚技术培训_彭世足疗 | HV全空气系统_杭州暖通公司—杭州斯培尔冷暖设备有限公司 | 电主轴-高速精密电主轴-高速电机厂家-瑞德沃斯品牌有限公司 | 密集架-手摇-智能-移动-价格_内蒙古档案密集架生产厂家 |