布景

刚开始开发使用,不少人没有留神到点击桌面图标翻开App有时间短的白屏或许黑屏的情况,时间短的白屏或许黑屏多多少少会影响用户的体验。其实只要咱们简略设置一下,你的App就没有了白屏或许黑屏,结束秒开的效果。哪里不会点哪里,So easy…

进程一:设置建议页主题

//在style.xml增加一个建议页主题
<style name="LauncherTheme" parent="Theme.App工商银行Compat.Light.NoActio宫颈癌早期症状nBar">
<item name="android:windowBackground">@drawable/bg_splash</item>
<item name="ahttp 302ndroid:fullBackupOnlHTTPSy">true</item>
<item name="windows键是哪个aappearndroid:windowNoTitle">true</item>
<item name="windowNoTitle"app是什么意思>true</item>
<item name="windowActionBar">false</item&gwindows许可证行将过期怎么办t;
&ltappear;item name="android:statusBarColor">@android:color/transparent</item>
<ithttp署理em name="https协议android:navigationBarColor">@android:color/transparent</item>
<item name=appearance"android:s工商银行creenOrientation"&gwindows是什么意思t;portrait</item>
<item name="android:windowSoftInputMode"&android体系gt;stateHidden</item>
<item name="android:configChanges"&gtwindows许可证行将过期怎么办;orientati龚俊on|kehttp://www.baidu.comyboardHiddapp下载en|screenSize</item>
</style>

进程龚俊二:给建议页设置主题


<actihttps和http的差异vity
android:nameGo=".LauncherActivity"
android:the工商银行客服电话me="@style/LauncherTheme"
android:screenOrientation="portrait">
...
</activity>

进程三:设置建议页主题windowBackground样式

drhttpwatchawable/bg_spappstorelash.xml

留神:建议页的layout.xml也需要用同一个布景图

android:background="@drawable/bg_splash"

<?xml versiwindows10on="1.0" encoding="uwindows许可证行将过期怎么办tf-8"?>
<layer-list xmlns:android="http://scandroid平板电脑价格hemas.android.com/apk/https认证res/anwindows键是哪个droid">
<item android:drawable="#ffffffhttps认证">
</item>
<!--appearance 假定中心有其他样式,可以翻开这个按照UI规划 -->
<!app是什么意思--    <item android:top="100dp">-->
<http 404!--        <android下载bitmap-->
<!--            android:ghttpclientravity="top|clip_vertical"-->
&Windowslt;!--            android:src="https://juejin.im/post/6989170152788983815/http署理@drawable/launcher_top"/>-->
<!--    </item>-->
<!-- LOGO案牍图 -->
<item android:bottom="40dp">
<bitmap
android:gravity="bottom|clip_vertical"
android:src="@drawable/launcher_bottom"/>
</item>
</layer-lisAPPt>

进程四:恢复默许主题

protected void onCreate(Buandroid/yunosndle savedInstanceState) {
super.onCreate(savedInstanceState);
setTheme(R.style.AppTheme);//恢复默许主题样式
setContehttps和http的差异ntView(R.layappreciateout.activity_main);
}

结语

效果图就不放了http署理,这种结束办法是市道比较盛行的做法,底部LOGO+全白的布景颜色,一般LOGO上面可以增加龚俊广告。冷建议白屏优化便是这么简略。假定你们有更好的秒开建议方案,可以留言。一起学习进步!

假定本文对你有协助,帮忙点赞或许留言,你的鼓舞是我共享的动力。