简体   繁体   English

在未连接Internet的情况下在WebView中显示空白页

[英]Showing blank page in WebView in no Internet Connected

In my WebView show URL Address when Mobile User doesn't have an Internet connection. 在我的WebView中,显示“移动用户”没有Internet连接时的URL地址。 So, I would like to show White Screen when user in WebView activity with no Internet connection. 因此,当用户处于没有Internet连接的WebView活动中时,我想显示白屏。

How can I do so? 我该怎么办?

First you should network connection programatically. 首先,您应该以编程方式进行网络连接。

If network connection is not available simply navigate to another activity or set another layout to your current activity. 如果网络连接不可用,只需导航到另一个活动或为当前活动设置另一个布局。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM