小工具知识网

当前位置: 首页 > 行业知识 > 关闭 Android SplashScreen(闪屏)

行业知识

关闭 Android SplashScreen(闪屏)

2026-11-06 07:03:26 来源:互联网转载

SplashScreen在Android 12上是强制的,如果你什么都不做,你的App在Android 12上就会自动拥有SplashScreen界面

但是这个SplashScreen界面太局限了能改的地方太少了

其实也没什么他主要作用是为了在App启动初始化的时候避免让用户在一个空白界面等待过长时间,一定程度上提升用户体验。

关闭这个闪屏也简单 把启动Activity的主题替换一下就好了比如:

            true        @android:color/transparent        true        portrait        @android:color/transparent    

如果你想自定义SplashScreen 可以继承R.style.Theme_SplashScreen 或者 R.style.Theme_SplashScreen_IconBackground.参考
SplashScreen  |  Android Developers

上一篇:米9怎么关谷歌服务器?

下一篇:Qt信号槽函数没有响应问题