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

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

WebView setLayoutParams examples from Open Source projects
This code example shows how to use the following methods: setId, setLayoutParams
    if ((row == null) || (row.findViewById(1337) == null)) {
      RelativeLayout layout = new RelativeLayout(activity);
      layout.setLayoutParams(new ListView.LayoutParams(ListView.LayoutParams.FILL_PARENT, ListView.LayoutParams.WRAP_CONTENT));
      row = layout;
       
      WebView webView = new WebView(activity);
      webView.setId(1337);
      RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT); 
      float scale = activity.getResources().getDisplayMetrics().density;
      boolean leftPadding = (parent.getTag().equals("right"));
      params.setMargins((int)(20 * scale) * (leftPadding ? 2 : 1), (int)(0 * scale), (int)(20 * scale), 0);
      webView.setLayoutParams(params);
      layout.addView(webView);
    } 
       
    WebView webView = (WebView)row.findViewById(1337);
 
    String item = (String)getItem(position);
    if (item.trim().length() == 0) {
      webView.loadData("<em>No information.</em>", "text/html", "utf-8");
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: setVisibility, getSettings, loadUrl, setLayoutParams, setWebViewClient
This code example shows how to use the following methods: setHorizontalScrollBarEnabled, setVerticalScrollBarEnabled, getSettings, setLayoutParams, setWebViewClient
		 
		NMEWebView.HaxeListenerClass = _haxeListenerClass;
		 
		View view;
		 
		WebView webView = new WebView(GameActivity.getContext());
		webView.setVerticalScrollBarEnabled(false);
        webView.setHorizontalScrollBarEnabled(false);
		webView.setWebViewClient(new WebViewClient() {
			@Override 
			public boolean shouldOverrideUrlLoading(WebView view, String url) {
				NMEWebView.HaxeListenerClass.call1("onURLChanging", url);
				view.loadUrl(url);
				 
				return true; 
			} 
		}); 
		 
		WebSettings webSettings = webView.getSettings();
		webSettings.setSavePassword(false);

7
CodeRank
This code example shows how to use the following methods: setId, setBackgroundColor, setLayoutParams
7
CodeRank
This code example shows how to use the following methods: loadData, setLayoutParams, setView
Related WebView setLayoutParams Questions & Answers:
setLayoutParams Method Overview
Set the layout parameters associated with this view.
See Code Examples for other Android WebView Methods: