久久久久久久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>
                            主站蜘蛛池模板: 国产农村妇女精品一二区 | 无码一区二区三区视频 | 国产精品久久网 | 国产美女特级嫩嫩嫩bbb片 | 狠狠操天天干 | 精品久久一区 | 成人国产a| 欧美精品成人一区二区三区四区 | 波多野结衣一区二区三区 | 亚洲乱码一区二区三区在线观看 | 特级黄色毛片 | 天天拍天天草 | 亚洲精品一区二区冲田杏梨 | 欧美在线综合 | 日韩精品一区二区三区中文在线 | 99久久精品免费看国产四区 | 女人毛片a毛片久久人人 | 亚洲一二三在线 | 国产一区二区在线免费观看 | 亚洲黄色片免费观看 | 久色一区 | 天天干夜夜拍 | 国产精品视频不卡 | 免费成人高清 | 国产精品视频免费看 | 精品国产一区二区在线 | 亚洲国产精品久久久久久 | 69精品久久久久久 | 天天看天天摸天天操 | 国产日韩精品一区二区三区 | 中文字幕日韩欧美一区二区三区 | 一级片av | 国产一区www| 午夜视频一区二区 | 欧美一级www片免费观看 | 亚洲欧洲成人 | 做a的各种视频 | 国产精品免费观看 | 欧美日韩不卡合集视频 | 久久精品国产一区二区电影 | 国产中文区二幕区2012 |