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

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

WebView setBackgroundColor examples from Open Source projects
This code example shows how to use the following methods: getContext, loadDataWithBaseURL, setBackgroundColor, setWebViewClient
146:	String source = getSource(wv.getContext()); 
-
149:	wv.setWebViewClient(this); 
-
152:	wv.loadDataWithBaseURL(null, html, "text/html", "utf-8", null); 
153:	wv.setBackgroundColor(color); 
Full Snippet Info
8
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: 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: setId, setBackgroundColor, setLayoutParams
238:	WebView webView = new WebView(context); 
239:	webView.setId(WEB_VIEW_ID); 
-
250:	webView.setLayoutParams(params); 
251:	webView.setBackgroundColor(Color.WHITE); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getContext, loadDataWithBaseURL, setBackgroundColor, setWebViewClient
145:	String source = getSource(wv.getContext()); 
-
148:	wv.setWebViewClient(this); 
-
151:	wv.loadDataWithBaseURL(null, html, "text/html", "utf-8", null); 
152:	wv.setBackgroundColor(color); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: loadDataWithBaseURL, setBackgroundColor, setScrollBarStyle
90:	final WebView webView = new WebView(context); 
-
93:	webView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY); 
94:	webView.setBackgroundColor(Color.WHITE); 
95:	webView.loadDataWithBaseURL("fake://not/needed", html, "text/html", "UTF-8", null); // Encoding 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setHorizontalScrollBarEnabled, setVerticalScrollBarEnabled, getSettings, setBackgroundColor, setWebChromeClient
108:	this.webView = new WebView(context); 
-
152:	WebSettings settings = webView.getSettings(); 
-
158:	webView.setBackgroundColor(0x00000000); // transparent 
159:	webView.setVerticalScrollBarEnabled(false); 
160:	webView.setHorizontalScrollBarEnabled(false); 
161:	webView.setWebChromeClient(new OpenXAdWebChromeClient()); 
Full Snippet Info
6
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: setHorizontalScrollBarEnabled, setOnTouchListener, setScrollContainer, setVerticalScrollBarEnabled, getSettings
67:	myWebView.setOnTouchListener(new MainWebViewOnTouchListener(this)); 
68:	myWebView.setWebViewClient(new MainWebViewClient(myTTActivity)); 
69:	myWebView.setScrollContainer(false); 
70:	myWebView.setVerticalScrollBarEnabled(true); 
71:	myWebView.setHorizontalScrollBarEnabled(false); 
72:	myWebView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY); 
73:	myWebView.setBackgroundColor(Color.BLACK); 
74:	WebSettings webSettings = myWebView.getSettings(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addJavascriptInterface, clearView, getSettings, loadUrl, setBackgroundColor
25:	WebView w = new WebView(context); 
26:	w.getSettings().setBuiltInZoomControls(useDefaultZoomControls); 
-
28:	w.setBackgroundColor(0x00000000); 
29:	w.getSettings().setJavaScriptEnabled(true); 
-
31:	w.setWebChromeClient(new WebChromeClient() { 
-
37:	w.setWebViewClient(new WebViewClient() { 
-
64:	w.addJavascriptInterface(new Object() { 
-
70:	w.clearView(); 
71:	w.loadUrl(getUrlToDisplay()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addJavascriptInterface, getSettings, loadUrl, setBackgroundColor
44:	mWebView.loadUrl("file:///android_asset/search.html"); 
45:	WebSettings webSettings = mWebView.getSettings(); 
-
50:	mWebView.setBackgroundColor(Color.BLACK); 
51:	mWebView.addJavascriptInterface(jsInterface, "gb"); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setFocusable, setHorizontalScrollBarEnabled, setVerticalScrollBarEnabled, clearCache, setBackgroundColor
52:	viewer.setInitialScale(0); 
53:	viewer.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY); 
54:	viewer.setHorizontalScrollBarEnabled(false); 
55:	viewer.setVerticalScrollBarEnabled(false); 
56:	viewer.setBackgroundColor(0x000000); 
57:	viewer.clearCache(true); 
58:	viewer.setFocusable(false); 
-
60:	viewer.setWebViewClient(new WebViewClient() { 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getSettings, loadUrl, setBackgroundColor
13:	WebView wbview = new WebView(this); 
-
15:	wbview.setBackgroundColor(0); 
16:	wbview.getSettings().setBuiltInZoomControls(true); 
17:	wbview.getSettings().setUseWideViewPort(true); 
18:	wbview.getSettings().setDefaultZoom(ZoomDensity.FAR); 
19:	wbview.getSettings().setLoadWithOverviewMode(true); 
20:	wbview.loadUrl("file:///android_asset/map.jpg"); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setHorizontalScrollBarEnabled, setVerticalScrollBarEnabled, getScale, getSettings, setBackgroundColor
22:	WebSettings appViewSett = app_view.getSettings(); 
-
24:	app_view.setBackgroundColor(0x999999); 
25:	app_view.setHorizontalScrollBarEnabled(false); 
26:	app_view.setHorizontalScrollbarOverlay(false); 
27:	app_view.setVerticalScrollBarEnabled(false); 
28:	app_view.setVerticalScrollbarOverlay(false); 
-
43:	Log.v( "current scale()", " = " + app_view.getScale() ); 
-
46:	app_view.setInitialScale( (int) scale ); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: loadData, setBackgroundColor
86:	WebView web = new WebView(mContext); 
87:	web.setBackgroundColor(Color.TRANSPARENT); 
-
91:	web.loadData(mMessage, "text/html", "utf-8"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: loadDataWithBaseURL, setBackgroundColor
69:	WebView icon = new WebView(this.getActivity()); 
-
75:	icon.loadDataWithBaseURL("", iString, mimeType, encoding, null); 
-
77:	icon.setBackgroundColor(0x00000000); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getSettings, setBackgroundColor, setInitialScale
414:	WebView	webView = new WebView(theActivity); 
415:	webView.setBackgroundColor(0); 
416:	webView.setInitialScale(0); 
417:	webView.getSettings().setJavaScriptEnabled(true); 
418:	webView.getSettings().setSupportZoom(true); 
419:	webView.getSettings().setBuiltInZoomControls(true); 
420:	webView.getSettings().setPluginsEnabled(true); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: loadDataWithBaseURL, setBackgroundColor
10:	view.loadDataWithBaseURL("", prefix + string + postfix, "text/html", "UTF-8", ""); 
11:	view.setBackgroundColor(0x00000000); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setBackgroundColor, x 1
114:	webview.setBackgroundColor(Color.BLACK); 
115:	webview.loadUrl("javascript:(function() { " + 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: getSettings, setBackgroundColor
34:	webView.getSettings().setSupportMultipleWindows(false); 
35:	webView.getSettings().setSupportZoom(false); 
36:	webView.setBackgroundColor(getResources().getColor(android.R.color.transparent)); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getSettings, setBackgroundColor
34:	webView.getSettings().setSupportMultipleWindows(false); 
35:	webView.getSettings().setSupportZoom(false); 
36:	webView.setBackgroundColor(getResources().getColor(android.R.color.transparent)); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setBackgroundColor
156:	this.mWebView.setBackgroundColor(color); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setBackgroundColor
23:	view.setBackgroundColor(color); 
Full Snippet Info
4
CodeRank
Related WebView setBackgroundColor Questions & Answers:
setBackgroundColor Method Overview
Sets the background color for this view.
See Also