Hi,
I am trying open twitter link : http://mobile.twitter.com/pawan_rathore88
in my activity.
If I set WebViewClient to webview I am getting blank page.
But when I load url without setting any webviewclient, it loads page
properly.
Does anyone have an idea what can be a problem.
Following is my code snippet.
webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setJavaScriptEnabled(true);
//if I comment the following line then webpage loads properly in default
Android browser.
webview.setWebViewClient(new WebViewClient() {
public void onReceivedError(WebView view, int errorCode, String
description, String failingUrl) {
Toast.makeText(activity, "Oh no! " + description,
Toast.LENGTH_SHORT).show();
}
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
Log.v(tag, "url :" + url);
view.loadUrl(url);
return true;
}
});
webview.loadUrl("http://mobile.twitter.com/pawan_rathore88");
Thanks,
Pawan
--
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