<style name="FlashTheme" parent="AppTheme"> <item name="android:windowBackground">@drawable/flash_bg</item>
</style>
FlashTheme是启动页的style样式,flash_bg就是这个启动页前面的填补空白或者黑屏的shape资源文件,我们进去看一下
:
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <bitmap android:id="@+id/bitmap_flash" android:src="@mipmap/bg_flash"></bitmap> </item> </layer-list>
这样就可以解决Android 启动页填补空白或黑屏资源配置。
本文介绍了一种解决Android启动页面出现空白或黑屏的方法,通过定义FlashTheme样式并使用layer-list来显示背景图片,有效地避免了启动过程中的视觉不适。
236

被折叠的 条评论
为什么被折叠?



