这是我在模拟器2.3中运行的编码,但是Webview
没有在android 2.3设备中加载..
如何解决这些问题?
代码::
public class WebViewActivity extends Activity {
WebView Browser;
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.webview);
Browser = (WebView) findViewById(R.id.webView1);
Browser.getSettings().setJavaScriptEnabled(true);
Browser.setWebViewClient(new MyWebViewClient());
Browser.loadUrl("http://twitter.com/ActionAppTweets");
}
private class MyWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
/* WebSettings webSettings = Browser.getSettings();
webSettings.setJavaScriptEnabled(true);*/
return true;
}
}
}