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

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

  • <legend id='jGorT'><style id='jGorT'><dir id='jGorT'><q id='jGorT'></q></dir></style></legend>

      <tfoot id='jGorT'></tfoot>

      1. <small id='jGorT'></small><noframes id='jGorT'>

      2. 如何創建將在水平維度上充滿的對話框

        How to create dialog which will be full in horizontal dimension(如何創建將在水平維度上充滿的對話框)
          <bdo id='2NMGS'></bdo><ul id='2NMGS'></ul>
                <tfoot id='2NMGS'></tfoot>

                  <tbody id='2NMGS'></tbody>
                • <small id='2NMGS'></small><noframes id='2NMGS'>

                  <i id='2NMGS'><tr id='2NMGS'><dt id='2NMGS'><q id='2NMGS'><span id='2NMGS'><b id='2NMGS'><form id='2NMGS'><ins id='2NMGS'></ins><ul id='2NMGS'></ul><sub id='2NMGS'></sub></form><legend id='2NMGS'></legend><bdo id='2NMGS'><pre id='2NMGS'><center id='2NMGS'></center></pre></bdo></b><th id='2NMGS'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='2NMGS'><tfoot id='2NMGS'></tfoot><dl id='2NMGS'><fieldset id='2NMGS'></fieldset></dl></div>
                • <legend id='2NMGS'><style id='2NMGS'><dir id='2NMGS'><q id='2NMGS'></q></dir></style></legend>
                • 本文介紹了如何創建將在水平維度上充滿的對話框的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  當我在布局中使用時,它指定了這個對話框 android:layout_width="match_parent" 我得到了這個對話框:

                  When I use in layout, which specifies this dialog android:layout_width="match_parent" I get this dialog:

                  我需要更寬的對話框.有什么想法嗎?

                  I need dialog which will be wider. Any ideas?

                  推薦答案

                  您可以通過抓取對話框使用的 Window 對象并重置寬度來實現.這是一個簡單的例子:

                  You can do that by grabbing the Window object that the dialog uses, and resetting the width. Here's a simple example:

                  //show the dialog first
                  AlertDialog dialog = new AlertDialog.Builder(this)
                          .setTitle("Test Dialog")
                          .setMessage("This should expand to the full width")
                          .show();
                  //Grab the window of the dialog, and change the width
                  WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
                  Window window = dialog.getWindow();
                  lp.copyFrom(window.getAttributes());
                  //This makes the dialog take up the full width
                  lp.width = WindowManager.LayoutParams.MATCH_PARENT;
                  lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
                  window.setAttributes(lp);
                  

                  這是最終結果.請注意,如果您需要微調某些內容(例如更改背景等),您可以對對話框進行更多樣式設置.當我過去不得不這樣做時,我通常使用這種方法,并在構建器類上使用 setView() 自定義對話框中使用的布局.

                  Here's the end result. Note that there's a lot more styling you can do to the dialog if you need to fine tune things (like change the background, etc). When I've had to do this in the past, I usually use this method, and customize the layout used in the dialog with setView() on the builder class.

                  這篇關于如何創建將在水平維度上充滿的對話框的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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='2pAQg'></tbody>

                      • <bdo id='2pAQg'></bdo><ul id='2pAQg'></ul>

                        <small id='2pAQg'></small><noframes id='2pAQg'>

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

                            主站蜘蛛池模板: 国产91一区二区三区 | 在线观看av网站永久 | 国产精品1区| 久久精品国产久精国产 | 亚洲欧美日韩精品 | 精品一区二区三区在线观看国产 | 91av在线视频观看 | 日韩欧美一区在线 | 日本一区二区高清视频 | 欧美一区二区三区视频在线观看 | 91欧美激情一区二区三区成人 | 一区二区中文字幕 | 羞羞午夜 | 亚洲一区二区三区福利 | 国产在线二区 | 国产高清视频在线 | 午夜视频一区 | 91精品国产91综合久久蜜臀 | 男人天堂网址 | 国产一级毛片精品完整视频版 | 日韩一区中文字幕 | 国外成人在线视频 | 欧美网址在线观看 | 成人久久 | 亚洲人成人一区二区在线观看 | 亚欧洲精品在线视频免费观看 | 中文字幕一区二区三区四区不卡 | www.日本在线观看 | av一区在线观看 | 天天爽综合网 | 亚洲激精日韩激精欧美精品 | 国产精品一二区 | 国产精品视频一区二区三区 | 久久久久国产 | 日本精品视频一区二区三区四区 | va在线| 国产精品久久久久aaaa | 国产成人精品一区二区三区网站观看 | 午夜网站视频 | 激情欧美一区二区三区 | 在线一区二区三区 |