0

I am trying to build a simple app that on first run (or cleared data) prompts the user to set a URL. This then is saved and directs the WebView to that URL.

I have created the app using a static URL, but can't figure out the setting of it out.

The webview is based on this: https://developer.android.com/reference/android/webkit/WebView.html just with some tweaks to get it to display in landscape.

4

1 に答える 1

2

メソッド LoadURL を使用して、ユーザーが指定した特定の方向に移動できます。このため

webView.loadUrl (String url);

ここで、変数はインスタンス化された webView クラス WebView です。

例えば:

WebView webView = (WebView) findViewById (R.id.webview);
于 2012-07-10T15:29:32.457 に答える