实现android app冷启动,我这边用到的是其中一种实现方式
主要分两步:
1.在values-styles中添加主题
<style name="AppStartTheme" parent="AppTranslucentTheme"> <!--冷启动时间更慢 但是点击图标是立即打开视觉效果--> <item name="android:windowFullscreen">true</item> <item name="android:windowBackground">@drawable/welcomingpic</item> </style>
2.在manifest中应用
<activity android:name="XXX.XXX.SplashActivity" android:screenOrientation="portrait" android:theme="@style/AppStartTheme"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>