android 启动页 秒开(不出现白屏)

解决:打开app的时候,启动界面为什么会先白屏一下然后进入启动界面。


1.在res/drawable创建一个splash.xml

2.在style里配置主题,Splash,注意设置parent为当前app的主题

3.在manifest中splash的activity标签中配置主题

4.删除启动界面的xml布局

5.删除activity中加载的setContentView

你可能感兴趣的:(android 启动页 秒开(不出现白屏))