码迷,mamicode.com
首页 > 其他好文 > 详细

Dialog的属性

时间:2017-08-31 21:06:27      阅读:212      评论:0      收藏:0      [点我收藏+]

标签:class   add   ref   nim   ges   log   its   col   cond   

<!-- Default theme for dialog windows and activities (on API level 10 and lower),
which is used by the
{@link android.app.Dialog} class. This changes the window to be
floating (not fill the entire screen), and puts a frame around its
contents. You can set this theme on an activity if you would like to
make an activity that looks like a Dialog. -->

    <style name="Theme.Dialog">
        <item name="windowFrame">@null</item>
        <item name="windowTitleStyle">@style/DialogWindowTitle</item>
        <item name="windowBackground">@drawable/panel_background</item>
        <item name="windowIsFloating">true</item>
        <item name="windowContentOverlay">@null</item>
        <item name="windowAnimationStyle">@style/Animation.Dialog</item>
        <item name="windowSoftInputMode">stateUnspecified|adjustPan</item>
        <item name="windowCloseOnTouchOutside">@bool/config_closeDialogWhenTouchOutside</item>
        <item name="windowActionModeOverlay">true</item>

        <item name="colorBackgroundCacheHint">@null</item>

        <item name="textAppearance">@style/TextAppearance</item>
        <item name="textAppearanceInverse">@style/TextAppearance.Inverse</item>

        <item name="textColorPrimary">@color/primary_text_dark</item>
        <item name="textColorSecondary">@color/secondary_text_dark</item>
        <item name="textColorTertiary">@color/tertiary_text_dark</item>
        <item name="textColorPrimaryInverse">@color/primary_text_light</item>
        <item name="textColorSecondaryInverse">@color/secondary_text_light</item>
        <item name="textColorTertiaryInverse">@color/tertiary_text_light</item>
        <item name="textColorPrimaryDisableOnly">@color/primary_text_dark_disable_only</item>
        <item name="textColorPrimaryInverseDisableOnly">@color/primary_text_light_disable_only</item>
        <item name="textColorPrimaryNoDisable">@color/primary_text_dark_nodisable</item>
        <item name="textColorSecondaryNoDisable">@color/secondary_text_dark_nodisable</item>
        <item name="textColorPrimaryInverseNoDisable">@color/primary_text_light_nodisable</item>
        <item name="textColorSecondaryInverseNoDisable">@color/secondary_text_light_nodisable</item>
        <item name="textColorHint">@color/hint_foreground_dark</item>
        <item name="textColorHintInverse">@color/hint_foreground_light</item>
        <item name="textColorSearchUrl">@color/search_url_text</item>

        <item name="textAppearanceLarge">@style/TextAppearance.Large</item>
        <item name="textAppearanceMedium">@style/TextAppearance.Medium</item>
        <item name="textAppearanceSmall">@style/TextAppearance.Small</item>
        <item name="textAppearanceLargeInverse">@style/TextAppearance.Large.Inverse</item>
        <item name="textAppearanceMediumInverse">@style/TextAppearance.Medium.Inverse</item>
        <item name="textAppearanceSmallInverse">@style/TextAppearance.Small.Inverse</item>

        <item name="listPreferredItemPaddingLeft">10dip</item>
        <item name="listPreferredItemPaddingRight">10dip</item>
        <item name="listPreferredItemPaddingStart">10dip</item>
        <item name="listPreferredItemPaddingEnd">10dip</item>

        <item name="preferencePanelStyle">@style/PreferencePanel.Dialog</item>
    </style>

 自定义Dialog

 

    <style name="MyDialog" parent="android:Theme.Dialog">
        <item name="android:windowFrame">@null</item>
        <item name="android:windowIsFloating">true</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:backgroundDimEnabled">false</item>
    </style>

 

Dialog的属性

标签:class   add   ref   nim   ges   log   its   col   cond   

原文地址:http://www.cnblogs.com/huyang011/p/7460292.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!