开发者

how to display web view in android

Intent intent = new Intent(this, MainActivit开发者_高级运维y.class); startActivity(intent);


To start a browser:

Uri uri = Uri.parse("http://www.example.com");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

to start a WebView inside your Activity:

WebView webview = new WebView(this);
setContentView(webview);
webview.loadUrl("http://stackoverflow.org/");

It's all explained here: http://developer.android.com/reference/android/webkit/WebView.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜