Skip to content

Commit 5ec858b

Browse files
committed
添加App启动优化代码
1 parent c65080d commit 5ec858b

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
android:roundIcon="@mipmap/ic_launcher_round"
2020
android:supportsRtl="true"
2121
android:theme="@style/AppTheme">
22-
<activity android:name=".WelcomeActivity">
22+
<activity android:name=".WelcomeActivity" android:theme="@style/SplashTheme">
2323
<intent-filter>
2424
<action android:name="android.intent.action.MAIN" />
2525

app/src/main/res/values/styles.xml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,8 @@
2525
</style>
2626

2727
<!--处理启动白屏,主题样式启动优化-->
28-
<style name="SplashTheme" parent="AppTheme">
29-
<!-- 这里的trans自己写一个#00000000即可-->
30-
<item name="android:windowBackground">@android:color/transparent</item>
31-
<item name="windowNoTitle">true</item>
32-
<item name="android:windowFullscreen">true</item>
28+
<style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">
29+
<item name="android:windowIsTranslucent">true</item>
3330
</style>
3431

3532
<style name="FullScreenTheme" parent="Theme.AppCompat.Light.NoActionBar">

0 commit comments

Comments
 (0)