doum
2025-10-15 2b287056e2f59518888d05a1bbc7e5a55fbd84d5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!--values-v21。5.0 以上提供了 setStatusBarColor()  方法设置状态栏颜色。-->
    <style name="CustomAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:windowTranslucentStatus">true</item>
        <item name="android:windowTranslucentNavigation">false</item>
    </style>
    <style name="GuideTheme" parent="AppTheme">
        <item name="android:windowBackground">@mipmap/bg_home</item>
        <!-- 或者是将主题设置成透明,虽然点击图标会有点小小的卡顿,但是用户体验不影响 -->
        <!-- <item name="android:windowIsTranslucent">true</item> --> <!-- 透明背景不要了 -->
        <item name="android:windowTranslucentStatus">false</item>
        <item name="android:windowTranslucentNavigation">false</item>
        <!--Android 5.x开始需要把颜色设置透明,否则导航栏会呈现系统默认的浅灰色-->
        <item name="android:statusBarColor">@android:color/transparent</item>
        <item name="android:navigationBarColor">@android:color/transparent</item>
    </style>
</resources>