久久久久久久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>

                            主站蜘蛛池模板: 欧美手机在线 | 久久精品在线 | 免费视频a | 四虎在线视频 | 国产精品视频网站 | 中文字幕在线播放视频 | 成人在线一区二区 | 亚洲综合激情 | 日韩精品国产一区 | 一级片毛片 | 久草网在线 | 亚洲国产免费 | 一级黄色录像带 | 中文字幕一区二区三区在线观看 | 国产欧美成人 | 亚洲三级av | 欧美综合久久 | 亚洲欧美第一页 | 一区二区高清视频 | 日本亚洲欧美 | 中文字幕免费在线看线人动作大片 | 亚洲一区国产精品 | 我要看一级黄色片 | 久久免费影院 | 国产香蕉av| 欧美日韩成人在线观看 | 国产女人水真多18毛片18精品 | 国产精品剧情 | 中文字幕一区二区在线播放 | 国产黄色免费 | 日本一级淫片色费放 | 97国产在线视频 | 日韩特黄| 亚洲香蕉视频 | 欧美日韩在线看 | 日日骚av | 国产伦精品一区二区三区免.费 | 日韩av在线不卡 | 亚洲精品不卡 | 日韩精品久久久久久久酒店 | 成人小视频在线观看 |