Android點選應用圖標出現閃屏的處理
阿新 • • 發佈:2019-02-16
首先在drawable資料夾建立shape_launch
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:opacity="opaque">
<item >
<bitmap
android:src="@drawable/splash" />
</item>
</layer-list>
然後在styles.xml裡新增 應用shape_launch
<style name="LaunchStyle" parent="AppTheme">
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowBackground">@drawable/shape_launch</item>
</style>
然後在splashActivity應用樣式主題
<activity android:name=".activity.SplashActivity" android:theme="@style/LaunchStyle"
就OK了