23 lines
1.1 KiB
XML
23 lines
1.1 KiB
XML
|
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
|
<!--
|
||
|
|
SplashScreen API(Android 12+, API 31+)主题
|
||
|
|
用 Theme.SplashScreen 库,需要在 build.gradle 依赖 androidx.core:core-splashscreen
|
||
|
|
-->
|
||
|
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||
|
|
|
||
|
|
<!-- Android 12+ 启动屏主题(API 31+)-->
|
||
|
|
<style name="Theme.App.Starting" parent="Theme.SplashScreen">
|
||
|
|
<item name="windowSplashScreenBackground">@color/splash_background</item>
|
||
|
|
<item name="windowSplashScreenAnimatedIcon">@mipmap/ic_launcher_foreground</item>
|
||
|
|
<item name="windowSplashScreenAnimationDuration">200</item>
|
||
|
|
<item name="postSplashScreenTheme">@style/Theme.DiaryNews</item>
|
||
|
|
</style>
|
||
|
|
|
||
|
|
<!-- Android 11 及以下启动屏主题(API < 31)— 用自定义 drawable 作 background-->
|
||
|
|
<style name="Theme.App.Starting.Legacy" parent="Theme.DiaryNews">
|
||
|
|
<item name="android:windowBackground">@drawable/splash_screen</item>
|
||
|
|
<item name="android:statusBarColor">@color/splash_background</item>
|
||
|
|
<item name="android:navigationBarColor">@color/splash_background</item>
|
||
|
|
</style>
|
||
|
|
|
||
|
|
</resources>
|