如何管理Android Webview的“空白白色加载"屏幕? [英] How to manage the Blank White Loading screen of an Android Webview?

查看:399
本文介绍了如何管理Android Webview的“空白白色加载"屏幕?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这不仅仅是直接的问题,而是视觉上的问题,但是当在我的应用程序中加载WebView时,屏幕将在2-4秒之间变为空白,直到内容完全加载为止.时间取决于正在加载的内容的大小.

This is more of a visual thing than a direct issue, but when a WebView loads in my application, the screen is blank white for between 2-4 seconds until the content is fully loaded. The time is dependent on the size of content that is loading.

是否有一种管理方式,以便屏幕仅在加载时刷新到内容?类似于正在加载..."动画还是类似的东西?我只是不想将纯白色的屏幕呈现给我的用户.

Is there a way to manage this, so that the screen will only refresh to the content when loaded? Something like a "loading..." animation or something similar? I just do not want the plain white screen presented to my users.

我有一个初始屏幕,然后加载WebView.最初的空白暂停(加载时)后,WebView可以正常工作,但是我想将其保留在特定的屏幕上,直到页面加载完毕或带有进度加载器的黑屏为止.

I have a splash screen that then loads the WebView. The WebView works fine after that initial blank pause (while loading), but I would like to hold it on a particular screen until the page has loaded or have a black screen with a progress loader.

也许有什么东西可以检测到负载已完成?如果是这种情况,我可以将其用作触发器.

Is there something that detects a load complete perhaps? If that were the case, I could use it as a trigger.

有人知道管理空白黑屏的方法吗?

Does anyone know of a way to manage this blank white screen?

谢谢!

/r

推荐答案

也许您可以看看上一期.

Maybe you can take a look at this previous issue.

如何收听WebView完成加载URL?

这篇关于如何管理Android Webview的“空白白色加载"屏幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆