解决启动页白屏问题

    xiaoxiao2021-03-25  205

    系统在启动时,首先会加载theme中资源,然后加载Application,然后再加载Activity中资源。

    所以可以通过为启动页设置theme来解决:

    一:在主题中设置背景

    <style name="ImageTranslucentTheme.flash"> <item name="android:background">@drawable/login</item> <style>

    二:将主题设置为透明

    <style name="ImageTranslucentTheme.flash"> <item name="android:windowBackground">@color/translate</item> <item name="android:windowIsTranslucent">true</item> <item name="android:windowAnimationStyle">@android:style/Animation.Translucent</item> </style>
    转载请注明原文地址: https://ju.6miu.com/read-9115.html

    最新回复(0)