android解决app开启瞬间白屏的问题
来源:互联网 发布:暂七师军乐队 知乎 编辑:程序博客网 时间:2024/04/26 11:55
1.在value中创建一个theme.xml,专门用来管理主题
内容如下
在baselighttheme中可以自定义一些属性,在别的地方可以通过引用的方式直接使用
<style name="BaseLightTheme" parent="@style/Theme.AppCompat.Light"> <item name="textColor">@color/textColor</item></style><!--去掉actionbar的主題--><style name="NoActionBarTheme" parent="BaseLightTheme"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item></style><!--全屏主題--><style name="FullScreenTheme" parent="NoActionBarTheme"> <item name="android:windowFullscreen">true</item></style><!--使用背景图片解决开启app瞬间白屏的问题,原来打算使用透明色,但是响应还是慢--><style name="SplashTheme" parent="FullScreenTheme"> <item name="android:windowBackground">@mipmap/img_splash</item> <item name="android:windowContentOverlay">@null</item></style><!-- 全透明的背景 --><style name="TransparentTheme" parent="FullScreenTheme"> <item name="android:windowBackground">@color/transparent</item> <item name="android:windowIsTranslucent">true</item></style>
2.在splash界面中实用该主题即可
<!-- splash界面 --> <activity android:name=".main.SplashActivity" android:screenOrientation="portrait" android:theme="@style/SplashTheme"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity>
0 0
- android解决app开启瞬间白屏的问题
- Android 解决启动app白屏或黑屏的问题
- Android解决app白屏问题
- Android 开机进入Launcher瞬间的切屏问题!
- android.app.IntentReceiverLeaked 问题的解决
- Android--app启动 黑白屏问题 解决
- Android开发之解决APP启动白屏或者黑屏闪现的问题
- Android解决APP启动白屏或者黑屏闪现的问题
- Android开发之解决APP启动白屏或者黑屏闪现的问题,androidapp
- Android开发之解决APP启动白屏或者黑屏闪现的问题
- 解决Android App第一次启动时显示白屏或者黑屏的问题
- 解决Android APP启动出现白屏或黑屏的问题
- 解决app启动时的白屏问题
- 解决app一打开白屏和黑屏的问题
- 解决APP启动白屏或者黑屏闪现的问题
- 解决APP冷启动白屏/黑屏的问题
- Android scheme的使用--解决浏览器打开app的问题
- android开启多进程,弥补系统分配给app的内存不足的问题
- iOS中的round/ceil/floorf函数略解
- java.lang.ClassCastException: hibernatehand.entity.Grade_$$_javassist_1 cannot be cast to javassist.
- 解决在JDK8中org.aspectj.apache.bcel.classfile.ClassFormatException Invalid byte tag in constant pool: 18
- 从尾到头打印单链表
- IntelliJ IDEA 同一窗口查看多个项目(模块),就像eclipse一样
- android解决app开启瞬间白屏的问题
- Java设计模式笔记之原型模式
- HDU4027线段树
- hdu 1085
- Android 开发,关于依赖库的制作,打包aar,及使用过程
- ZigBee_2530初学笔记
- pyspark + mongodb
- 学习运维——虚拟机管理
- 自动配置ssh公私钥