android-discuss icon indicating copy to clipboard operation
android-discuss copied to clipboard

App 启动页白屏优化,大家有没有什么好的方案

Open hidetag opened this issue 8 years ago • 4 comments

app 在桌面上被点击之后,会先经历一段白屏,白屏过后才会显示正常的 Splash 页面,大家有没有什么好的方案解决这个?白屏时间一般受到 冷启动 和 热启动的影响,其中 冷启动 白屏时间最长,热启动稍微好点。但是如果 app 过于庞大,虽然 application 中做的操作不多,但依然还是会出现白屏

hidetag avatar Apr 16 '18 03:04 hidetag

Theme设置 window:background

Hidetag [email protected]于2018年4月16日 周一上午11:45写道:

app 在桌面上被点击之后,会先经历一段白屏,白屏过后才会显示正常的 Splash 页面,大家有没有什么好的方案解决这个?白屏时间一般受到 冷启动 和 热启动的影响,其中 冷启动 白屏时间最长,热启动稍微好点。但是如果 app 过于庞大,虽然 application 中做的操作不多,但依然还是会出现白屏

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/android-cn/android-discuss/issues/696, or mute the thread https://github.com/notifications/unsubscribe-auth/ADM4ZWxk_OMS_A4BtkVK3Iur_3pCuP2zks5tpBO9gaJpZM4TV00N .

-- 发自移动版 Gmail

YangCheung avatar Apr 16 '18 03:04 YangCheung

就是楼上那种。不过如果用图片做背景的话要注意可能引发的oom。

mariohide avatar Apr 16 '18 04:04 mariohide

参考 https://www.bignerdranch.com/blog/splash-screens-the-right-way/ 就是别setContentView() 直接在主题里面设置背景

shiguiyou avatar Jun 06 '18 01:06 shiguiyou

启动页的Style中设置背景图片,也就是启动页的图片,秒起,但是注意,会有变形问题

SiberiaDante avatar Jun 12 '18 09:06 SiberiaDante