在做完了欢迎界面后,测试效果时发现在欢迎界面出现前会有3秒钟的白屏,我们只要定义透明的主题,parent中的AppTheme为APP的主题即可
1.在values文件夹里面的styles.xml里面定义一个样式:
<style name="Theme.AppStartLoadTranslucent" parent="AppTheme"> <item name="android:windowIsTranslucent">true</item> <item name="android:windowNoTitle">true</item> </style>
2.去androidmanifest.xml下的Activity添加刚刚定义的主题
android:theme="@style/Theme.AppStartLoadTranslucent"
最后感谢博主http://blog.csdn.net/lzyang187/article/details/50819449)的文章