SplashScreen  |  Android Developers

发布时间:2025-06-24 20:55:05  作者:北方职教升学中心  阅读量:351



SplashScreen  |  Android Developers。他的主要功能是避免用户在应用程序启动初始化时在空白界面上等待太久c;在一定程度上提升用户体验
关闭这个闪屏也很简单 更换启动Activity的主题,#xff0c;你的app在Android上 SplashScreen界面将在12上自动拥有。
事实上,可以改变的地方太少了。

SplashScreenAndroid 12是强制性的,如果你什么都不做,
但是SplashScreen界面太有限了,如:

<style name="SplashScreen" parent="Theme.AppCompat.Light.NoActionBar">        <item name="android:windowNoTitle">true</item>        <item name="android:windowBackground">@android:color/transparent</item>        <item name="android:windowIsTranslucent">true</item>        <item name="android:screenOrientation">portrait</item>        <item name="android:statusBarColor">@android:color/transparent</item>    </style>

如果你想自定义SplashScrenenen 可以继承R.style.Theme_SplashScreen 或者 R.style.Theme_SplashScreen_IconBackground.参考。