WebView loadUrl - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for WebView loadUrl method.

This code example shows how to use the following methods: loadUrl
	} 
	 
	/* Return Base64 Encoded String to Javascript */ 
	public void processPicture( String js_out )
	{		 
		mAppView.loadUrl("javascript:navigator.camera.win('" + js_out + "');");			
	} 
	 
	public void failPicture(String err)
	{ 
		mAppView.loadUrl("javascript:navigator.camera.fail('" + err + "');");
	} 
	 
} 
Full Snippet Info
9
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods: getSettings, loadUrl, setWebViewClient
		super(activity);
 
		this.setTitle("Changelog");
 
		 
		WebView 	view 	 = new WebView(activity);
		WebSettings settings = view.getSettings();  
         
		settings.setJavaScriptEnabled(true);  
		settings.setAppCacheEnabled(false);
         
		view.setWebViewClient( new WebViewClient() {
			@Override 
			public void onPageStarted( WebView view, String url, Bitmap favicon ) {
				if( mLoader == null )
					mLoader = ProgressDialog.show( activity, "", "Loading changelog ..." );
				 
				super.onPageStarted(view, url, favicon);
			} 
 

10
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods: loadUrl
	} 
 
	public void onSensorChanged(SensorEvent event) {
		// We want to know what temp this is. 
		float temp = event.values[0];
		mAppView.loadUrl("javascript:gotTemp(" + temp + ")");
	} 
 
} 
Full Snippet Info
8
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods: x 1
    			byte buff[] = new byte[rawData.length];
    			in.read(buff, 0, buff.length);
    			out.write(buff, 0, rawData.length);
    			out.flush();
    			out.close();    			
    			mView.loadUrl("javascript:navigator.file.winCallback('File written')");
    		} catch (Exception e) { 
    			mView.loadUrl("javascript:navigator.file.failCallback('Fail')"); 
    		} 
		return 0; 
    } 
     
 
} 
Full Snippet Info
8
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods: getSettings, loadUrl, setWebChromeClient, setWebViewClient
    mWebView = ((WebView) findViewById(R.id.webview));
    initWebView(); 
  } 
 
  private void initWebView() { 
    mWebView.setWebViewClient(new WebViewClient());
    mWebView.setWebChromeClient(new WebChromeClient());
    WebSettings settings = mWebView.getSettings();
    settings.setSavePassword(true);
    settings.setSaveFormData(true);
    settings.setJavaScriptEnabled(true);
    settings.setSupportZoom(false);
    settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
    settings.setDomStorageEnabled(true);
    settings.setSupportMultipleWindows(false);
 
 
    mWebView.loadUrl("http://developer.android.com");
  } 
 

7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods: getSettings, loadUrl, setBackgroundColor
		@Override 
		public void onCreate(Bundle state)
		{ 
			super.onCreate(state);
 
			WebView view = new WebView(this);
			view.getSettings().setJavaScriptEnabled(true);
			view.loadUrl("file:///android_asset/about.html");
			view.setBackgroundColor(Color.TRANSPARENT);
			setContentView(view);
		} 
	} 
 
	@TargetApi(11) 
	public static class AboutFragment extends WebViewFragment {
		@Override 
		public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{ 
			WebView view = (WebView)super.onCreateView(inflater, container, savedInstanceState);
			view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
Full Snippet Info
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods: loadUrl
 
 
	public void onSensorChanged(SensorEvent event) {
		// We only care about the orientation as far as it refers to Magnetic North 
		float heading = event.values[0];
		mAppView.loadUrl("javascript:gotBearing(" + heading + ")");
	} 
} 
Full Snippet Info
8
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods: loadUrl
 
    @Override 
    protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
 
      WebView wv=new WebView(getContext());
 
      wv.loadUrl("http://commonsware.com");
 
      setContentView(wv);
    } 
  } 
} 
Full Snippet Info
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
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: getSettings, loadUrl
                Toast.LENGTH_LONG);
        toast.setGravity(Gravity.CENTER, -40, 0);
        toast.show();
 
        /** Show the details to the user */ 
        WebView webView = new WebView(this);
        webView.getSettings().setJavaScriptEnabled(true);
        webView.getSettings().setBuiltInZoomControls(true);
        webView.getSettings().setEnableSmoothTransition(true);
        /** This enables double-tap to zoom */ 
        webView.getSettings().setUseWideViewPort(true);
 
        setContentView(webView);
        webView.loadUrl(Summarizer.getDetailsUri().toString());
 
        mEverythingFinished = true;
        if (mOnEverythingFinishedCallback != null) {
            mOnEverythingFinishedCallback.onFinished();
        } 
    } 
Full Snippet Info
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java

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 Code Examples for other Android WebView Methods: