Android Application Programming

Tips & Tricks

Saturday, January 2, 2016

Prevent webview from showing "web page not available"

Apply the below Code,

WebView.setWebViewClient(new WebViewClient() {
    public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
        WebView.loadUrl("file:///android_asset/myerrorpage.html");

    }
});
Posted by Admin at 6:27 PM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: WebView
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Links

  • ►  2017 (2)
    • ►  March (1)
    • ►  January (1)
  • ▼  2016 (1)
    • ▼  January (1)
      • Prevent webview from showing "web page not availa...
  • ►  2015 (1)
    • ►  September (1)
  • ►  2014 (12)
    • ►  July (2)
    • ►  June (2)
    • ►  May (4)
    • ►  April (1)
    • ►  March (1)
    • ►  January (2)
  • ►  2013 (3)
    • ►  November (1)
    • ►  August (2)
  • ►  2012 (1)
    • ►  September (1)

Tips

  • How to
  • Notification Bar
  • WebView
  • Window
  • click event
  • touch event
Ethereal theme. Powered by Blogger.