I am using webview. If the page is not correct or the website is down,
how can I error trap a page not found and show the users an error page
or some
othe page?
I am very much a beginner so I need examples of code.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
WebView webview = new WebView(this);
setContentView(webview);
WebSettings webSettings = webview.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setBuiltInZoomControls(true);
// No error trapping
webview.setWebViewClient(new WebViewClient());
webview.loadUrl("http://www.MyWebsite.com");
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en