当前位置: 首页 > news >正文

关闭 Android SplashScreen(闪屏)

SplashScreen在Android 12上是强制的,如果你什么都不做,你的App在Android 12上就会自动拥有SplashScreen界面
但是这个SplashScreen界面太局限了能改的地方太少了
其实也没什么他主要作用是为了在App启动初始化的时候避免让用户在一个空白界面等待过长时间,一定程度上提升用户体验。
关闭这个闪屏也简单 把启动Activity的主题替换一下就好了比如:

    <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>

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

http://www.lryc.cn/news/217277.html

相关文章:

  • react_16
  • 前端性能分析工具
  • 根据Aurora发送时序,造Aurora 数据包,从而进行AXIS接口数据位宽转换仿真
  • java后端响应结果Result
  • react_11
  • AI:52-基于深度学习的垃圾分类
  • [shell,hive] 在shell脚本中将hiveSQL分离出去
  • 求两个(法)向量之间的rpy夹角
  • [100天算法】-每个元音包含偶数次的最长子字符串(day 53)
  • 从科幻走向现实,LLM Agent 做到哪一步了?
  • [笔记] 数据类型
  • QT学习之QT概述
  • 编写shell脚本,利用mysqldump实现MySQL数据库分库分表备份
  • 本地部署Jellyfin影音服务器并实现远程访问影音库
  • 【数据结构】希尔排序
  • 使用VBA打印PDF文件
  • 分布式ID系统设计(2)
  • http和https的区别,以及https涉及到的加密过程
  • 使用php打印时间精确到毫秒及毫秒转成11位时间戳
  • uni-app离线打包在android studio创建的.jks证书,签名文件获取MD5问题
  • 333333333333
  • Python:字符串格式化
  • 虹科示波器 | 汽车免拆检修 | 2010款江铃陆风X8车发动机怠速抖动、加速无力
  • 左和右,激进与保守,都是相对概念,但是都会滑向同一种
  • js中的遍历
  • Python算法——快速排序
  • 操作系统备考学习 day12 (第五章)
  • Elasticsearch删除映射类型
  • 网络工程师进阶课:华为HCIP认证课程介绍
  • 单行自动横向滚动——css实现