I have a problem in my ANDROID application.
I would like to display a twitter page in my webview but the URL won't open.
It keeps loading infinitely.
I am using sdk 1.6.
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setLoadsImagesAutomatically(true);
webView.setBackgroundColor(0x00000000);
webView.getSettings().setAllowFileAccess(true);
webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
final Activity activity = this;
webView.setWebChromeClient(new WebChromeClient() {
public void onProgressChanged(WebView view, int progress) {
activity.setProgress(progress * 100);
Log.e("progress",progress+" "+((progress * 100)));
if(progress==100)
{
//getWindow().setFeatureInt(Window.FEATURE_PROGRESS,Window.PROGRESS_VISIBILITY_OFF);
indicator.setVisibility(View.GONE);
}
else
{
indicator.setVisibility(View.VISIBLE);
}
}
});
webView.getSettings().setUseWideViewPort(true);
webView.setWebViewClient(new ApplicationWebViewClient());
}
private class ApplicationWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url)
{
view.loadUrl(url);
return super.shouldOverrideUrlLoading(view, url);
}