我是新来的android programing.my问题是,在我的webview,当我点击任何链接其打开一个新的web浏览器我不需要这个我希望它被打开在我的应用程序本身。有人帮助我?webview链接打开到默认浏览器
这是我的代码
title = extras.getString("title");
url = extras.getString("url");
TextView text=(TextView) findViewById(R.id.textView1);
text.setText(title);
WebView myWebView =(WebView)findViewById(R.id.WebView);
myWebView.getSettings().setJavaScriptEnabled(true);
myWebView.setWebViewClient(new WebViewClient(){
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return false;
}
});
}
我试过,但我的web视图没有加载它显示一个空白屏幕
检查此链接http://www.tutorialspoint.com/android/ android_webview_layout.htm – Piyush 2014-11-08 04:45:41
检查这个http://www.technotalkative.com/android-webviewclient-example/ – 2014-11-08 04:45:55
感谢你的回复..它的工作完美.. – 2014-11-08 05:15:07