styles.xml 4.49 KB
Newer Older
konghaorui committed
1 2 3
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!--自定义分享-->
konghaorui committed
4 5
    <style name="platform_transparentFrameWindowStyle" parent="android:style/Theme.Dialog">
        <item name="android:windowBackground">@drawable/platform_share_choose_bg</item>
konghaorui committed
6 7
    </style>

konghaorui committed
8 9 10
    <style name="platform_main_menu_animstyle">
        <item name="android:windowEnterAnimation">@anim/platform_share_dialog_in_anim</item>
        <item name="android:windowExitAnimation">@anim/platform_share_dialog_out_anim</item>
konghaorui committed
11 12
    </style>

konghaorui committed
13
    <style name="platform_CommonTheme" parent="Theme.AppCompat.Light.NoActionBar">
14 15
        <item name="colorPrimary">@color/platform_main_theme</item>
        <item name="colorPrimaryDark">@color/platform_main_theme</item>
konghaorui committed
16
        <item name="android:fitsSystemWindows">true</item>
konghaorui committed
17 18 19 20
        <item name="android:windowBackground">@color/platform_theme_bg</item>
        <item name="android:textSize">@dimen/platform_default_text_size</item>
        <item name="android:textColor">@color/platform_default_text_color</item>
        <item name="android:textColorHint">@color/platform_default_text_color_hint</item>
konghaorui committed
21 22 23
        <item name="android:textCursorDrawable">@null</item>
    </style>

洪国微 committed
24

konghaorui committed
25
    <!--四边边距都为0的dialog-->
徐健 committed
26 27 28 29 30 31 32 33
    <style name="platform_dialog_default_style" parent="@android:style/Theme.Dialog">
        <item name="android:windowBackground">@color/transparent</item>
        <item name="android:windowFrame">@null</item>
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowIsFloating">true</item>
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:backgroundDimEnabled">true</item>
    </style>
konghaorui committed
34 35

    <!-- 仿ios普通对话框 -->
konghaorui committed
36
    <style name="platform_normaldialog_style" parent="@android:style/Theme.Dialog">
konghaorui committed
37 38 39 40
        <item name="android:windowFrame">@null</item>
        <item name="android:windowIsFloating">true</item>
        <item name="android:windowIsTranslucent">false</item>
        <item name="android:windowNoTitle">true</item>
万齐军 committed
41 42
        <item name="android:layout_marginRight">0dp</item>
        <item name="android:layout_marginLeft">0dp</item>
konghaorui committed
43
        <item name="android:windowBackground">@drawable/platform_normaldialog_bg</item>
konghaorui committed
44 45 46 47 48 49 50 51
        <item name="android:backgroundDimEnabled">true</item>
    </style>

    <!-- 仿ios普通对话框 -->

    <!-- toolbar 文本 -->

    <!-- 项目中的分割线 -->
konghaorui committed
52 53
    <style name="platform_viewline">
        <item name="android:background">@color/platform_color_E0E0E0</item>
konghaorui committed
54 55 56 57
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">0.5dp</item>
    </style>

王佳洋 committed
58
    <style name="platform_BottomDialogAnimation" parent="baseDialog">
konghaorui committed
59 60
        <item name="android:windowEnterAnimation">@anim/platform_bottom_dialog_slide_show</item>
        <item name="android:windowExitAnimation">@anim/platform_bottom_dialog_slide_hide</item>
konghaorui committed
61 62
    </style>

konghaorui committed
63
    <style name="platform_NoTitleTheme" parent="Theme.AppCompat.Light.DarkActionBar">
konghaorui committed
64 65 66 67
        <!-- Customize your theme here. -->
        <item name="android:windowActionBar">false</item>
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
68 69 70
        <item name="colorPrimary">@color/platform_main_theme</item>
        <item name="colorPrimaryDark">@color/platform_main_theme</item>
        <item name="colorAccent">@color/platform_main_theme</item>
konghaorui committed
71 72
    </style>

王佳洋 committed
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
    <style name="baseDialog" parent="android:style/Theme.Dialog">
        <item name="android:windowNoTitle">true</item><!-- 是否显示title -->
        <item name="android:windowFrame">@null</item><!-- Dialog的windowFrame框 -->
        <item name="android:windowIsFloating">true</item><!-- 是否浮现在activity之上 -->
        <item name="android:windowBackground">@android:color/transparent</item><!--背景透明-->
        <item name="android:background">@android:color/transparent</item>
        <item name="android:backgroundDimEnabled">true</item>
        <!-- 用来控制灰度的值,当为1时,界面除了我们的dialog内容是高亮显示的,dialog以外的区域是黑色的,完全看不到其他内容,系统的默认值是0.5 -->
        <item name="android:backgroundDimAmount">0.6</item>
        <item name="android:windowMinWidthMajor">50%</item>
        <item name="android:windowMinWidthMinor">50%</item>
    </style>
    <style name="bottomUpDialog" parent="baseDialog">
        <item name="android:windowAnimationStyle">@style/platform_BottomDialogAnimation</item>
    </style>
konghaorui committed
88
</resources>