public class Browser1Activity extends Activity {
TextView url;
WebView ourBrow;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.main);
ourBrow = (WebView) findViewById(R.id.wvBrowser);
url = (TextView) findViewById(R.id.tvURL);
// cancel the web intent that default in android setting
ourBrow.setWebViewClient(new WebViewClient());
// webView seeting
ourBrow.getSettings().setJavaScriptEnabled(true);
ourBrow.getSettings().setLoadWithOverviewMode(true);
ourBrow.getSettings().setUseWideViewPort(true);
try {
ourBrow.loadUrl("https://www.google.com.au");
} catch (Exception e) {
e.printStackTrace();
}
url.setText(ourBrow.getUrl());
}
}
为什么我拿回价表。 <代码>TextView
的设定完全是罚款的,WebView
也有效,但在我推出该推介器时,斜体显示任何情况。 <代码>ourBrow的设定是否有任何错误?