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

    • <bdo id='4Db9q'></bdo><ul id='4Db9q'></ul>

    <tfoot id='4Db9q'></tfoot>
  1. <legend id='4Db9q'><style id='4Db9q'><dir id='4Db9q'><q id='4Db9q'></q></dir></style></legend>

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

    <small id='4Db9q'></small><noframes id='4Db9q'>

    1. Android:對(duì)話框在 droid 3 上有額外的、丑陋的空間

      Android: Dialogs have extra, ugly space on droid 3?(Android:對(duì)話框在 droid 3 上有額外的、丑陋的空間?)
      • <bdo id='h8FDk'></bdo><ul id='h8FDk'></ul>
          <tbody id='h8FDk'></tbody>

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

        3. <legend id='h8FDk'><style id='h8FDk'><dir id='h8FDk'><q id='h8FDk'></q></dir></style></legend>

            <tfoot id='h8FDk'></tfoot>

                本文介紹了Android:對(duì)話框在 droid 3 上有額外的、丑陋的空間?的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                第一張圖片來自 Galaxy Note,第二張來自 Droid 3.它們都由以下代碼生成.

                The first image is from a Galaxy Note, the second is from a Droid 3. Both of them produced from the below code.

                Droid 3 上的對(duì)話框有大量額外的、難看的空間.這個(gè)空間在更復(fù)雜的對(duì)話框上更加丑陋.有什么辦法可以預(yù)防嗎?

                The dialog on the Droid 3 has a significant amount of extra, ugly space. This space is even uglier on more complex dialogs. Is there any way to prevent it?

                public void onCreate(Bundle bundle)
                    {
                        super.onCreate(bundle);
                
                        TextView tv = new TextView(this);
                        tv.setText("Hello!");
                
                        Dialog dialog = new Dialog(this);
                        dialog.setContentView(tv);
                        dialog.setTitle("Hi!");
                
                        dialog.show();
                    }
                

                推薦答案

                這些 Droid UI 定制讓我抓狂!

                These Droid UI customizations drive me crazy!

                如果您想控制您的對(duì)話框以使它們?cè)谠O(shè)備之間保持一致,您可以使用提供樣式參數(shù)的構(gòu)造函數(shù)將它們簡(jiǎn)化為基礎(chǔ).以下示例給出了一個(gè)如下所示的對(duì)話框:

                If you'd like to control your dialogs to make them consistent across devices, you can strip them down to the basics with a constructor that supplies a style parameter. The following example gives a dialog that looks like this:

                首先,像這樣實(shí)例化您的對(duì)話框(或者更好的是,創(chuàng)建一個(gè)擴(kuò)展 Dialog 的自定義類,以便您可以重用它):

                First, instantiate your dialog like this (or better yet, create a custom class that extends Dialog so you can reuse it):

                Dialog dialog = new Dialog(context, android.R.style.Theme_Translucent_NoTitleBar);
                dialog.setContentView(R.layout.custom_dialog_layout);
                

                然后,提供一個(gè) custom_dialog_layout.xml(可能看起來像這樣):

                Then, supply a custom_dialog_layout.xml (could look something like this):

                <?xml version="1.0" encoding="utf-8"?>
                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                    android:id="@+id/layout_root"
                    style="@style/VerticalLinearLayout"
                    android:background="@android:color/transparent"
                    android:gravity="center_vertical|center_horizontal" >
                
                    <LinearLayout
                        android:id="@+id/dialog_layout"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_margin="10dp"
                        android:background="@drawable/dialog_background"
                        android:orientation="vertical" >
                
                        <TextView
                            android:layout_width="fill_parent"
                            android:layout_height="wrap_content"
                            android:padding="5dp"
                            android:textColor="@android:color/white"
                            android:text="Hi!" />
                
                        <TextView
                            android:layout_width="fill_parent"
                            android:layout_height="wrap_content"
                            android:padding="5dp"
                            android:textColor="@android:color/white"
                            android:text="Hello!" />
                
                    </LinearLayout>
                </LinearLayout>
                

                dialog_background.xml 看起來像這樣:

                where dialog_background.xml looks something like this:

                <?xml version="1.0" encoding="UTF-8"?>
                <shape xmlns:android="http://schemas.android.com/apk/res/android" >
                
                    <corners android:radius="10dp" />
                
                    <stroke
                        android:width="1dp"
                        android:color="@android:color/black" />
                
                    <gradient
                        android:angle="0"
                        android:startColor="@android:color/white"
                        android:endColor="@android:color/white" />
                
                </shape>
                

                如果你真的想變得花哨,你可以嘗試使用類似這樣的答案在代碼中對(duì) dialog_layout 應(yīng)用陰影:https://stackoverflow.com/a/372??3654/475217

                And if you really want to get fancy, you could try applying a drop shadow to the dialog_layout in code using something like this SO answer: https://stackoverflow.com/a/3723654/475217

                這篇關(guān)于Android:對(duì)話框在 droid 3 上有額外的、丑陋的空間?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                相關(guān)文檔推薦

                Get user#39;s current location using GPS(使用 GPS 獲取用戶的當(dāng)前位置)
                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(如何檢測(cè)位置提供者?GPS 或網(wǎng)絡(luò)提供商)
                Get current location during app launch(在應(yīng)用啟動(dòng)期間獲取當(dāng)前位置)
                locationManager.getLastKnownLocation() return null(locationManager.getLastKnownLocation() 返回 null)

                      • <bdo id='vzedV'></bdo><ul id='vzedV'></ul>

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

                          <tbody id='vzedV'></tbody>
                        <i id='vzedV'><tr id='vzedV'><dt id='vzedV'><q id='vzedV'><span id='vzedV'><b id='vzedV'><form id='vzedV'><ins id='vzedV'></ins><ul id='vzedV'></ul><sub id='vzedV'></sub></form><legend id='vzedV'></legend><bdo id='vzedV'><pre id='vzedV'><center id='vzedV'></center></pre></bdo></b><th id='vzedV'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='vzedV'><tfoot id='vzedV'></tfoot><dl id='vzedV'><fieldset id='vzedV'></fieldset></dl></div>
                        1. <legend id='vzedV'><style id='vzedV'><dir id='vzedV'><q id='vzedV'></q></dir></style></legend>
                        2. <tfoot id='vzedV'></tfoot>
                          主站蜘蛛池模板: 国产精品久久久久无码av | 精品久久久久久久久久久院品网 | 日本精品视频 | 欧美精品一区二区在线观看 | 亚欧洲精品在线视频免费观看 | 91福利在线导航 | 久久久久久久久中文字幕 | 少妇淫片aaaaa毛片叫床爽 | 欧美电影在线观看网站 | 欧美h视频 | 亚洲久久一区 | 亚洲精品大全 | 日本精品网站 | www.99热.com| 中文字幕一区二区三区精彩视频 | 亚洲成人国产综合 | 亚洲电影中文字幕 | 日韩国产精品一区二区三区 | 蜜桃日韩 | 国产欧美精品一区二区 | 国产激情自拍视频 | 天天狠狠 | 国产精品久久久久久久久久久久久久 | 91精品国产高清一区二区三区 | 欧美成视频 | 91视频. | 日本人做爰大片免费观看一老师 | 国产精品一区在线 | 欧美一区二区三区四区在线 | 久久精品国产精品青草 | 日韩在线免费视频 | 欧美日韩精品久久久免费观看 | 亚洲黄色网址视频 | 中文字幕精品一区二区三区精品 | 欧美一区二区综合 | 国产精品欧美一区喷水 | 久久成人免费视频 | 天天干天天干 | 久久久久久亚洲欧洲 | www国产亚洲精品久久网站 | 一级做a爰片久久毛片 |