Best code examples for WebView loadUrl method (android.webkit.WebView.loadUrl)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for WebView loadUrl method.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

WebView loadUrl examples from Open Source projects
This code example shows how to use the following methods: loadUrl
26:	mAppView.loadUrl("javascript:navigator.camera.win('" + js_out + "');"); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: getSettings, loadUrl, setWebViewClient
42:	WebView 	view 	 = new WebView(activity); 
43:	WebSettings settings = view.getSettings(); 
-
48:	view.setWebViewClient( new WebViewClient() { 
-
91:	view.loadUrl("http://www.dsploit.net/changelog.php"); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: loadUrl
50:	mAppView.loadUrl("javascript:gotTemp(" + temp + ")"); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: x 1
116:	mView.loadUrl("javascript:navigator.file.winCallback('File written')"); 
-
118:	mView.loadUrl("javascript:navigator.file.failCallback('Fail')"); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getSettings, loadUrl, setWebChromeClient, setWebViewClient
25:	mWebView.setWebViewClient(new WebViewClient()); 
26:	mWebView.setWebChromeClient(new WebChromeClient()); 
27:	WebSettings settings = mWebView.getSettings(); 
-
37:	mWebView.loadUrl("http://developer.android.com"); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getSettings, loadUrl, setBackgroundColor
204:	WebView view = new WebView(this); 
205:	view.getSettings().setJavaScriptEnabled(true); 
206:	view.loadUrl("file:///android_asset/about.html"); 
207:	view.setBackgroundColor(Color.TRANSPARENT); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: loadUrl
52:	mAppView.loadUrl("javascript:gotBearing(" + heading + ")"); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: loadUrl
73:	WebView wv=new WebView(getContext()); 
-
75:	wv.loadUrl("http://commonsware.com"); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setVisibility, getSettings, loadUrl, setLayoutParams, setWebViewClient
202:	WebView webView = new WebView(this.getContext()); 
-
204:	webView.setWebViewClient(new AuthorizationWebViewClient()); 
-
206:	WebSettings webSettings = webView.getSettings(); 
-
209:	webView.loadUrl(this.requestUri.toString()); 
210:	webView.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, 
-
212:	webView.setVisibility(View.VISIBLE); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getSettings, loadUrl
139:	WebView webView = new WebView(this); 
140:	webView.getSettings().setJavaScriptEnabled(true); 
141:	webView.getSettings().setBuiltInZoomControls(true); 
142:	webView.getSettings().setEnableSmoothTransition(true); 
-
144:	webView.getSettings().setUseWideViewPort(true); 
-
147:	webView.loadUrl(Summarizer.getDetailsUri().toString()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: clearCache, loadUrl, stopLoading
120:	webView.stopLoading(); 
-
122:	webView.clearCache(true); 
-
126:	webView.loadUrl(url); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getSettings, loadUrl, setWebChromeClient, setWebViewClient
25:	webView = new WebView(this); 
-
34:	webView.getSettings().setJavaScriptEnabled(true); 
-
36:	webView.setWebChromeClient(new WebChromeClient() { 
-
42:	webView.setWebViewClient(new GoogleAuthWebViewClient()); 
-
44:	webView.loadUrl(AUTH_URL); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: loadUrl
49:	mAppView.loadUrl("javascript:gotAcceleration(" + x + ", " + y + "," + z + ")"); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: clearCache, loadUrl, stopLoading
124:	webView.stopLoading(); 
-
126:	webView.clearCache(true); 
-
130:	webView.loadUrl(url); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: requestFocus, setOnTouchListener, getSettings, loadUrl, setWebViewClient
235:	final WebView wv = new WebView(context); 
-
265:	wv.getSettings().setJavaScriptEnabled(true); 
-
267:	wv.requestFocus(View.FOCUS_DOWN); 
268:	wv.setOnTouchListener(new View.OnTouchListener() { 
-
300:	wv.setWebViewClient(new WebViewClient() { 
-
351:	wv.loadUrl(startUrl); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: loadUrl
72:	mAppView.loadUrl("javascript:gotAccel(" + x +  ", " + y + "," + z + " )"); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: loadUrl, setWebChromeClient
14:	WebView view = new WebView(this); 
15:	view.setWebChromeClient(new WebChromeClient() { 
-
22:	view.loadUrl(getIntent().getData().toString()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getSettings, loadUrl, setLayoutParams, setScrollBarStyle, setWebChromeClient
29:	WebView webView = new WebView(this); 
30:	webView.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, 
-
32:	webView.loadUrl(getIntent().getDataString()); 
33:	webView.getSettings().setJavaScriptEnabled(true); 
34:	webView.getSettings().setSupportZoom(true); 
35:	webView.getSettings().setBuiltInZoomControls(true); 
-
37:	webView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY); 
38:	webView.getSettings().setUseWideViewPort(true); 
-
42:	webView.setWebViewClient(new WebViewClient() { 
-
67:	webView.setWebChromeClient(new WebChromeClient() { 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: loadUrl
90:	mAppView.loadUrl("javascript:Device.setData('Android','" + version + "','" + this.getUuid() + "')"); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: loadUrl
31:	browser=new WebView(this); 
-
33:	browser.loadUrl(getIntent().getStringExtra(URL)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: loadUrl
146:	appView.loadUrl(url); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getSettings, loadUrl, setBackgroundColor, setWebChromeClient
35:	webView.setBackgroundColor(Color.BLACK); 
-
39:	webView.setWebChromeClient(new WebChromeClient()); 
40:	webView.getSettings().setJavaScriptEnabled(true); 
41:	webView.getSettings().setPluginState(PluginState.ON); 
42:	webView.loadUrl(String.format("data:text/html;charset=utf-8,%s", Uri.encode(html))); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: loadUrl
23:	WebView webview = new WebView(this); 
-
27:	webview.loadUrl("file:///android_asset/help_page/" + filename); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: addJavascriptInterface, getSettings, loadUrl, setScrollBarStyle, setWebChromeClient
28:	web = new WebView(this); 
29:	web.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY); 
-
32:	web.getSettings().setJavaScriptEnabled(true); 
33:	web.getSettings().setAllowFileAccess(true); 
-
35:	web.addJavascriptInterface(javascriptInterface, "android"); 
36:	web.setWebChromeClient(new WebChromeClient()); 
37:	web.setWebViewClient(new GenericWebViewClient()); 
-
56:	web.loadUrl(url); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getSettings, loadUrl, reload, setWebViewClient
24:	WebView webView = new WebView(this); 
-
28:	webView.getSettings().setJavaScriptEnabled(true); 
29:	webView.setWebViewClient(new HelloWebViewClient()); 
30:	webView.reload(); 
-
32:	webView.loadUrl(url); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setSystemUiVisibility, clearCache, getSettings, loadUrl
27:	WebView view =new WebView(this); 
28:	setContentView(view); 
29:	setupWebView(view); 
30:	view.clearCache(true); 
31:	view.getSettings().setAppCacheEnabled(false); 
32:	view.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE); 
33:	view.setSystemUiVisibility(View.VISIBLE); 
-
40:	view.loadUrl("file:///sdcard/wcalc/index.html"); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: canGoBack, getUrl, goBack, loadUrl
71:	System.out.println("com.manuelmaly.mockingdroid.monitor: " + this.monitor.getMetrics(webview.getUrl())); 
-
83:	} else if ((keyCode == KeyEvent.KEYCODE_BACK) && webview.canGoBack()) { 
-
86:	String gotoURL = URIHelper.urlForLink(webview.getUrl(), currentPageBackButtonURL).toString(); 
-
88:	webview.loadUrl(gotoURL); 
-
90:	webview.goBack(); 
-
92:	this.monitor.backButtonPressed(webview.getUrl()); 
-
97:	URI menuURL = URIHelper.getMenuScreenURL(getApplicationContext(), webview.getUrl()); 
-
99:	webview.loadUrl(menuURL.toString()); 
-
103:	URI searchURL = URIHelper.getSearchScreenURL(getApplicationContext(), webview.getUrl()); 
-
105:	webview.loadUrl(searchURL.toString()); 
-
113:	return webview.getUrl().equals(startURI); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: loadUrl
68:	browser.loadUrl(buf.toString()); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getSettings, loadUrl, setWebChromeClient, setWebViewClient
25:	webview = new WebView(this); 
-
33:	webview.getSettings().setJavaScriptEnabled(true); 
34:	webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE); 
-
37:	webview.setWebChromeClient( new WebChromeClient() { 
-
45:	webview.setWebViewClient( new WebViewClient() { 
-
53:	webview.loadUrl(getIntent().getStringExtra("link")); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setHorizontalScrollBarEnabled, setVerticalScrollBarEnabled, getSettings, loadUrl, setLayoutParams
102:	mWebView = new WebView(getContext()); 
103:	mWebView.setVerticalScrollBarEnabled(false); 
104:	mWebView.setHorizontalScrollBarEnabled(false); 
105:	mWebView.setWebViewClient(new FbDialog.FbWebViewClient()); 
106:	mWebView.getSettings().setJavaScriptEnabled(true); 
107:	mWebView.loadUrl(mUrl); 
108:	mWebView.setLayoutParams(FILL); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: getSettings, loadUrl, setWebChromeClient, setWebViewClient
59:	webView.loadUrl(authURL); 
-
73:	webView = new WebView(this); 
74:	webView.getSettings().setJavaScriptEnabled(true); 
75:	webView.getSettings().setBuiltInZoomControls(true); 
76:	webView.setWebViewClient(new CustomWebViewClient()); 
77:	webView.setWebChromeClient(new WebChromeClient() { 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setHorizontalScrollBarEnabled, setVerticalScrollBarEnabled, setVisibility, getSettings, loadUrl
85:	mWebView = new WebView(getContext()); 
86:	mWebView.setVerticalScrollBarEnabled(false); 
87:	mWebView.setHorizontalScrollBarEnabled(false); 
88:	mWebView.setWebViewClient(new FbDialog.FbWebViewClient()); 
89:	mWebView.getSettings().setJavaScriptEnabled(true); 
90:	mWebView.loadUrl(mUrl); 
91:	mWebView.setLayoutParams(FILL); 
92:	mWebView.setVisibility(View.INVISIBLE); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: addJavascriptInterface, getSettings, loadUrl, setLayoutParams, setWebChromeClient
24:	mWebView = new WebView(this); 
-
26:	mWebView.setLayoutParams(new LinearLayout.LayoutParams( 
-
29:	mWebView.loadUrl("file:///android_asset/www/index2.html"); 
30:	mWebView.getSettings().setJavaScriptEnabled(true); 
31:	mWebView.addJavascriptInterface(new MyHybrid(), "MyHybrid"); 
32:	mWebView.setWebChromeClient(new WebChromeClient() { 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: clearCache, loadUrl, stopLoading
120:	webView.stopLoading(); 
-
122:	webView.clearCache(true); 
-
126:	webView.loadUrl(url); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: requestFocus, setVisibility, loadUrl
143:	webView.setVisibility(View.VISIBLE); 
144:	webView.loadUrl(webCreationPage); 
145:	webView.requestFocus(View.FOCUS_DOWN); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: loadUrl
113:	browser.loadUrl(url); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: setHorizontalScrollBarEnabled, setVerticalScrollBarEnabled, getSettings, loadUrl, setLayoutParams
109:	mWebView = new WebView(getContext()); 
-
111:	mWebView.setVerticalScrollBarEnabled(false); 
112:	mWebView.setHorizontalScrollBarEnabled(false); 
113:	mWebView.setWebViewClient(new TwitterWebViewClient()); 
114:	mWebView.getSettings().setJavaScriptEnabled(true); 
115:	mWebView.loadUrl(mUrl); 
116:	mWebView.setLayoutParams(FILL); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: loadUrl, setBackgroundColor, setScrollBarStyle, setWebViewClient
19:	mWebView = new WebView(this); 
20:	mWebView.setBackgroundColor(0xFFEEEEEE); 
21:	mWebView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY); 
22:	mWebView.setWebViewClient(new WebViewClient() { 
-
29:	mWebView.loadUrl("file:///android_asset/licenses.html"); 
-
31:	setContentView(mWebView); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: loadUrl
72:	wv.loadUrl(url); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getSettings, loadUrl, setScrollBarStyle
20:	enchantView = new WebView(this); 
-
23:	enchantView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY); 
24:	enchantView.getSettings().setJavaScriptEnabled(true); 
-
26:	enchantView.loadUrl(ENCHANT_URL); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getHeight, addJavascriptInterface, getContentHeight, getSettings, x 1
32:	log.d( "webView.getHeight {0}", webView.getHeight() ); 
33:	log.d( "webView.getContentHeight {0}", webView.getContentHeight() ); 
-
35:	WebSettings webSettings = webView.getSettings(); 
-
37:	webView.addJavascriptInterface( new JavaScriptInterface(), JS_BRIDGE ); 
38:	webView.loadUrl( JS_CONTENTSIZE ); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setHorizontalScrollBarEnabled, setVerticalScrollBarEnabled, getSettings, loadUrl, setLayoutParams
108:	mWebView = new WebView(getContext()); 
109:	mWebView.setVerticalScrollBarEnabled(false); 
110:	mWebView.setHorizontalScrollBarEnabled(false); 
111:	mWebView.setWebViewClient(new FoursquareDialog.FoursquareWebViewClient()); 
112:	mWebView.getSettings().setJavaScriptEnabled(true); 
113:	mWebView.loadUrl(mUrl); 
114:	mWebView.setLayoutParams(FILL); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: addJavascriptInterface, getSettings, loadUrl
33:	WebSettings settings = slide.getSettings(); 
-
38:	slide.addJavascriptInterface(new JsObject(activity), "Android"); 
-
44:	slide.loadUrl(url); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: loadUrl
33:	view.loadUrl(url); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setHorizontalScrollBarEnabled, setVerticalScrollBarEnabled, getSettings, loadUrl, setLayoutParams
101:	mWebView = new WebView(getContext()); 
-
103:	mWebView.setVerticalScrollBarEnabled(false); 
104:	mWebView.setHorizontalScrollBarEnabled(false); 
105:	mWebView.setWebViewClient(new TwitterWebViewClient()); 
106:	mWebView.getSettings().setJavaScriptEnabled(true); 
107:	mWebView.loadUrl(mUrl); 
108:	mWebView.setLayoutParams(FILL); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: requestLayout, loadUrl
151:	wv.loadUrl("javascript:" + method); 
-
154:	wv.requestLayout(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addJavascriptInterface, getSettings, loadUrl, setWebChromeClient, setWebViewClient
69:	webView = new WebView(activity); 
70:	webView.getSettings().setJavaScriptEnabled(true); 
71:	webView.setWebChromeClient(new WebChromeClient() {  // Purely for debugging. 
-
78:	webView.setWebViewClient(new WebViewClient() {  // Purely for debugging. 
-
87:	webView.addJavascriptInterface( 
-
89:	webView.loadUrl(gaeUrl); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: requestFocus, setOnTouchListener, getSettings, loadUrl, setScrollBarStyle
183:	webView = new WebView(context); 
-
186:	webView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY); 
187:	webView.getSettings().setJavaScriptEnabled(true); 
188:	webView.getSettings().setDomStorageEnabled(true); 
-
191:	webView.requestFocus(View.FOCUS_DOWN); 
192:	webView.setOnTouchListener(new View.OnTouchListener() { 
-
216:	webView.setWebViewClient(webViewClient); 
217:	webView.loadUrl(url); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getSettings, loadUrl, setScrollBarStyle
15:	mWebView=new WebView(this); 
-
18:	mWebView.getSettings().setJavaScriptEnabled(true); 
19:	mWebView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY); 
20:	mWebView.loadUrl("file:///android_asset/www/index.html"); 
Full Snippet Info
6
CodeRank
Related WebView loadUrl Questions & Answers:
Other WebView loadUrl Examples
21:			webview = (WebView) findViewById(R.id.webpage);
22:			webview.getSettings().setJavaScriptEnabled(true);
23:			webview.loadUrl(page_url);
24:			
25:			webview.setWebViewClient(new DisPlayWebPageActivityClient());
-
38:		    @Override
39:		    public boolean shouldOverrideUrlLoading(WebView view, String url) {
40:		        view.loadUrl(url);
41:		        return true;
42:		    }

Read More

loadUrl Method Overview
Loads the given URL.
See Also