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

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

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

      1. <legend id='VgLTc'><style id='VgLTc'><dir id='VgLTc'><q id='VgLTc'></q></dir></style></legend>

          <bdo id='VgLTc'></bdo><ul id='VgLTc'></ul>
      2. 對話框問題:添加內(nèi)容前必須調(diào)用requestFeature()

        Dialog problem: requestFeature() must be called before adding content(對話框問題:添加內(nèi)容前必須調(diào)用requestFeature())
      3. <tfoot id='AR83G'></tfoot>

            <bdo id='AR83G'></bdo><ul id='AR83G'></ul>

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

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

                1. 本文介紹了對話框問題:添加內(nèi)容前必須調(diào)用requestFeature()的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在創(chuàng)建一個包含 EditText 的自定義對話框,以便我可以從用戶那里獲取文本數(shù)據(jù):

                  I'm creating a custom dialog containing an EditText so that I can get text data from the user:

                  final EditText newKey = (EditText) findViewById(R.id.dialog_result);
                  AlertDialog.Builder keyBuilder = new AlertDialog.Builder(StegDroid.this);
                  keyBuilder
                  .setCancelable(false)
                  .setPositiveButton("Try Again", new DialogInterface.OnClickListener() {
                      public void onClick(DialogInterface dialog, int id) {
                          Log.v("Dialog","New Key: "+newKey.getText().toString());
                      }
                  })
                  .setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
                         public void onClick(DialogInterface dialog, int id) {
                              dialog.cancel();
                         }
                     });
                  AlertDialog dialog = keyBuilder.create();
                  dialog.setTitle("Decryption Failed");
                  dialog.setContentView(R.layout.decrypt_failed_dialog);
                  dialog.show();
                  

                  但是我總是遇到這個異常:

                  However I always get this exception:

                  01-11 18:49:00.507: ERROR/AndroidRuntime(3461): android.util.AndroidRuntimeException: requestFeature() must be called before adding content
                  01-11 18:49:00.507: ERROR/AndroidRuntime(3461):     at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:181)
                  01-11 18:49:00.507: ERROR/AndroidRuntime(3461):     at com.android.internal.app.AlertController.installContent(AlertController.java:199)
                  01-11 18:49:00.507: ERROR/AndroidRuntime(3461):     at android.app.AlertDialog.onCreate(AlertDialog.java:251)
                  
                  ...
                  

                  dialog.show() 行.我應該怎么做才能擺脫這種情況?

                  at the line of dialog.show(). What should I be doing to get rid of this?

                  推薦答案

                  你需要在創(chuàng)建對話框之前設置自定義視圖.如果您使用 AlertDialogsetView(View) 而不是 setContentView()>.

                  You need to set the custom view before creating the dialog. Also you need to use setView(View) instead of setContentView() if you are using the default positive and negative buttons provided for you by the AlertDialog.

                  final EditText newKey = (EditText) findViewById(R.id.dialog_result);
                  AlertDialog.Builder keyBuilder = new AlertDialog.Builder(StegDroid.this);
                  keyBuilder
                  .setCancelable(false)
                  .setPositiveButton("Try Again", new DialogInterface.OnClickListener() {
                      public void onClick(DialogInterface dialog, int id) {
                          Log.v("Dialog","New Key: "+newKey.getText().toString());
                      }
                  })
                  .setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
                         public void onClick(DialogInterface dialog, int id) {
                              dialog.cancel();
                         }
                     });
                  keyBuilder.setTitle("Decryption Failed");
                  keyBuilder.setView(getLayoutInflater().inflate(R.layout.decrypt_failed_dialog, null));
                  AlertDialog dialog = keyBuilder.create();
                  dialog.show();
                  

                  這篇關于對話框問題:添加內(nèi)容前必須調(diào)用requestFeature()的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權益,請聯(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 或網(wǎng)絡提供商)
                  Get current location during app launch(在應用啟動期間獲取當前位置)
                  locationManager.getLastKnownLocation() return null(locationManager.getLastKnownLocation() 返回 null)
                    <bdo id='WBcoC'></bdo><ul id='WBcoC'></ul>
                    <i id='WBcoC'><tr id='WBcoC'><dt id='WBcoC'><q id='WBcoC'><span id='WBcoC'><b id='WBcoC'><form id='WBcoC'><ins id='WBcoC'></ins><ul id='WBcoC'></ul><sub id='WBcoC'></sub></form><legend id='WBcoC'></legend><bdo id='WBcoC'><pre id='WBcoC'><center id='WBcoC'></center></pre></bdo></b><th id='WBcoC'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='WBcoC'><tfoot id='WBcoC'></tfoot><dl id='WBcoC'><fieldset id='WBcoC'></fieldset></dl></div>
                      <tbody id='WBcoC'></tbody>

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

                        <tfoot id='WBcoC'></tfoot>

                          1. <legend id='WBcoC'><style id='WBcoC'><dir id='WBcoC'><q id='WBcoC'></q></dir></style></legend>
                            主站蜘蛛池模板: 欧产日产国产精品视频 | 成人在线播放网站 | 久草网址 | 另类视频在线 | 国产精品免费一区二区三区四区 | 免费三级网| 国产中的精品av涩差av | 午夜免费视频 | 亚洲午夜精品视频 | 欧美区日韩区 | 成人久久18免费网站 | 亚洲一级淫片 | 日日操av | 亚洲成人自拍 | 99精品久久 | 国产精品免费福利 | 爱草在线 | 国产精品乱码一区二区三区 | 五月婷婷激情 | 日韩欧美电影在线 | 日韩精品成人 | 国产福利91精品 | 国产精品国产成人国产三级 | 狠狠色狠狠色综合系列 | 国产成人网 | 在线观看日韩av | 久久人体视频 | 国产精品久久亚洲 | 国产一区亚洲 | 婷婷丁香在线视频 | 国产精品视频播放 | 91精品国产一区二区三区动漫 | 国产欧美精品区一区二区三区 | a级毛片免费高清视频 | 黄色国产视频 | 伊人超碰在线 | 99久久精品免费 | 欧美在线一区二区三区 | 亚洲 中文 欧美 日韩 在线观看 | 久久亚洲春色中文字幕久久久 | 欧美日韩在线视频一区二区 |