久久久久久久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. 對話框問題:添加內容前必須調用requestFeature()

        Dialog problem: requestFeature() must be called before adding content(對話框問題:添加內容前必須調用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. 本文介紹了對話框問題:添加內容前必須調用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();
                  

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

                  【網(wǎng)站聲明】本站部分內容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(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黑人 | 成人特级毛片 | 隔壁老王国产在线精品 | 天天影视综合 | 美女在线视频一区二区三区 | 国产精品99久久久久久久vr | 成人av电影在线观看 | 国产一级片 | 精品国产鲁一鲁一区二区张丽 | 日韩一区三区 | 伊人伊成久久人综合网站 | 男人的天堂在线视频 | 伦理午夜电影免费观看 | 久久精品国产一区 | 91久久精品国产91久久性色tv | 国产精品一区二区三区免费观看 | 一级片免费网站 | 亚洲精品一区二区三区中文字幕 | 2018天天干天天操 | 91人人看| 亚洲久视频 | 日韩中文字幕一区 | 亚洲三级在线 | 九九综合九九 | 欧美午夜精品久久久久免费视 | 九九综合| 国产一区二区欧美 | 久久久91精品国产一区二区三区 | 国产久 | 中文字幕高清一区 | 久久久九九九九 | 日韩视频精品在线 | 成人区精品一区二区婷婷 | 最新中文字幕在线 | 欧美日韩高清在线一区 | 免费精品在线视频 | 国产精品中文字幕在线播放 | 欧美日韩网站 | 蜜臀av日日欢夜夜爽一区 | 欧美精品一区二区三区在线 |