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

  • <small id='LMNIy'></small><noframes id='LMNIy'>

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

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

        Android:對話框關閉而不調用關閉

        Android: Dialog dismisses without calling dismiss(Android:對話框關閉而不調用關閉)
        • <i id='Uw28r'><tr id='Uw28r'><dt id='Uw28r'><q id='Uw28r'><span id='Uw28r'><b id='Uw28r'><form id='Uw28r'><ins id='Uw28r'></ins><ul id='Uw28r'></ul><sub id='Uw28r'></sub></form><legend id='Uw28r'></legend><bdo id='Uw28r'><pre id='Uw28r'><center id='Uw28r'></center></pre></bdo></b><th id='Uw28r'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Uw28r'><tfoot id='Uw28r'></tfoot><dl id='Uw28r'><fieldset id='Uw28r'></fieldset></dl></div>

              <legend id='Uw28r'><style id='Uw28r'><dir id='Uw28r'><q id='Uw28r'></q></dir></style></legend>
                <tbody id='Uw28r'></tbody>
                <bdo id='Uw28r'></bdo><ul id='Uw28r'></ul>
              • <tfoot id='Uw28r'></tfoot>

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

                1. 本文介紹了Android:對話框關閉而不調用關閉的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我有一個執行一些驗證的對話框(如下).你的問題是,顯示 Toast 后對話框被關閉,而我沒有調用關閉.我需要展示 toast 并保持對話框打開以更正錯誤.

                  I have a dialog which performs some validation (below). Thee problem is, the dialog is dismissed after the Toast is displayed, without me calling dismiss. I need to show the toast and keep the dialog open to correct the error.

                  final EditText txtName = new EditText(this);
                  AlertDialog.Builder dlgAdd = new AlertDialog.Builder(this)
                      .setTitle(R.string.create_category)
                      .setMessage(R.string.name)
                      .setView(txtName)
                      .setPositiveButton(R.string.ok, new OnClickListener() {
                          @Override
                          public void onClick(DialogInterface dialog, int which) {
                              String newCatName = txtName.getText().toString().trim(); // Converts the value of getText to a string.
                              if (newCatName != null && newCatName .length() ==0)
                              {  
                                  Toast.makeText(ManageCategories.this, R.string.err_name_required, 3500).show();
                  
                              } else {
                                  try {
                                      boolean alreadyExists = mDatabaseAdapter.getCategoryIDs(newCatName).length > 0;// ids of cats with this name
                                      if(alreadyExists) {
                                          Toast.makeText(ManageCategories.this, R.string.categoryAlreadyExists, 3500).show();
                                      } else {
                                          mDatabaseAdapter.addCategory(newCatName);
                                      }
                                  }catch(Exception ex){
                                      Toast.makeText(ManageCategories.this, R.string.error+':'+ ex.getLocalizedMessage(), 3500).show();
                              }
                              }
                          }
                      }).setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
                             public void onClick(DialogInterface dialog, int id) {
                                  dialog.cancel();
                             }
                  });
                  dlgAdd.show();
                  

                  推薦答案

                  我猜你并沒有像這里的 Android 文檔中提到的那樣創建和顯示對話框 http://developer.android.com/guide/topics/ui/dialogs.html 使用 OnCreateDialog 函數

                  My guess is that you are not creating and showing dialog as mentioned in the Android docs here http://developer.android.com/guide/topics/ui/dialogs.html using OnCreateDialog functions

                  請按照文檔中的說明進行操作,如果仍然無法正常工作,請告知我們.

                  Please do as mentioned in the docs and let us know if it still does not work.

                  這篇關于Android:對話框關閉而不調用關閉的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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)
                  <legend id='Lj5Sb'><style id='Lj5Sb'><dir id='Lj5Sb'><q id='Lj5Sb'></q></dir></style></legend>

                        <bdo id='Lj5Sb'></bdo><ul id='Lj5Sb'></ul>
                        <tfoot id='Lj5Sb'></tfoot>

                          <tbody id='Lj5Sb'></tbody>

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

                          • 主站蜘蛛池模板: 欧美日韩久久精品 | 日韩精品久久 | 国产9999精品 | 污视频免费在线观看 | 国产精品一区二区三区免费观看 | 日韩视频精品在线 | 最新日韩在线视频 | 欧美日韩在线免费观看 | 国产在线h| 九九热在线免费观看 | 日本黄色影片在线观看 | www.免费看片.com | h视频免费在线观看 | 黄色毛片免费看 | 高清一区二区三区 | 欧美一区二区三区日韩 | 99re6在线视频精品免费 | 成人在线视频一区 | 精品国产乱码久久久久久老虎 | 99久久日韩精品免费热麻豆美女 | 国产欧美一区二区三区日本久久久 | 亚洲成人自拍 | 日韩av啪啪网站大全免费观看 | 精品国产乱码久久久久久88av | 精品久久精品 | 色综合一区| 亚洲久草 | 黄色片免费看 | 国产亚洲成av人在线观看导航 | 久久精品国产免费看久久精品 | 久久aⅴ乱码一区二区三区 亚洲欧美综合精品另类天天更新 | 日韩综合在线视频 | 国产精品视频一区二区三区不卡 | 伊人久久大香线 | 亚洲精品久久久久国产 | 成人精品一区二区 | 免费毛片网 | 亚洲精品一二区 | 亚洲最新网址 | 亚洲午夜在线 | 人人草人人干 |