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

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

WebView reload examples from Open Source projects
This code example shows how to use the following methods: canGoBack, canGoForward, goBack, goForward, reload
191:	if (v.getId() == mBackButton.getId() && mWebView.canGoBack()) { // 上一頁 
192:	mWebView.goBack(); 
193:	} else if (v.getId() == mForwardButton.getId() && mWebView.canGoForward()) { // 下一頁 
194:	mWebView.goForward(); 
-
196:	mWebView.reload(); 
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: getOriginalUrl, loadUrl, reload, scrollTo
103:	viewer.loadUrl("file://" + Environment.getExternalStorageDirectory() 
-
107:	Log.i(Preview.LOGTAG ,"algo "+"resume "+viewer.getOriginalUrl()); 
108:	viewer.reload(); 
109:	viewer.scrollTo(scrollX, scrollY); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: loadUrl, reload, scrollTo
77:	viewer.loadUrl("file://" + Environment.getExternalStorageDirectory() 
-
80:	viewer.reload(); 
81:	viewer.scrollTo(scrollX, scrollY); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: reload
142:	view.reload(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: reload
89:	webview.reload(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: reload
113:	mWebView.reload(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: reload
100:	webview.reload(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: reload
97:	m_wv.reload(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: reload
108:	mWebView.reload(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: reload
86:	webview.reload(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: reload
97:	mWebView.reload(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: reload
103:	webView.reload(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: reload
40:	webview.reload(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: reload
90:	mWebView.reload(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: reload
19:	view.reload(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: reload
141:	view.reload(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: reload
272:	mWebView.reload(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: reload, getContext
62:	view.getContext().startActivity(i); 
63:	view.reload(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: reload
65:	webView.reload(); 
Full Snippet Info
4
CodeRank
Related WebView reload Questions & Answers:
WebView Class Overview
A View that displays web pages. This class is the basis upon which you can roll your own web browser or simply display some online content within your Activity. It uses the WebKit rendering engine to display web pages and includes methods to navigate forward and backward through a history, zoom in and out, perform text searches and more.Note that, in order for your Activity to access the Internet and load web pages in a WebView, you must add the INTERNET permissions to your Android Manifest file:This must be a child of the element.For more information, read Building Web Apps in WebView.By default, a WebView provides no browser-like widgets, does not enable JavaScript and web page errors are ignored. If your goal is only to display some HTML as a part of your UI, this is probably fine; the user won't need to interact with the web page beyond reading it, and the web page won't need to interact with the user. If you actually want a full-blown web browser, then you probably want to invoke the Browser application with a URL Intent rather than show it with a WebView. For example: Uri uri = Uri.parse("http://www.example.com"); Intent intent = new Intent(Intent.ACTION_VIEW, uri); startActivity(intent); See Intent for more information.To provide a WebView in your own Activity, include a in your layout, or set the entire Activity window as a WebView during onCreate():Then load the desired web page:A WebView has several customization points where you can add your own behavior. These are:Here's a more complicated example, showing error handling, settings, and progress notification:To enable the built-in zoom, set WebSettings.setBuiltInZoomControls(boolean) (introduced in API level CUPCAKE).NOTE: Using zoom if either the height or width is set to WRAP_CONTENT may lead to undefined behavior and should be avoided.For obvious security reasons, your application has its own cache, cookie store etc.—it does not share the Browser application's data. By default, requests by the HTML to open new windows are ignored. This is true whether they be opened by JavaScript or by the target attribute on a link. You can customize your WebChromeClient to provide your own behaviour for opening multiple windows, and render them in whatever manner you want.The standard behavior for an Activity is to be destroyed and recreated when the device orientation or any other configuration changes. This will cause the WebView to reload the current page. If you don't want that, you can set your Activity to handle the orientation and keyboardHidden changes, and then just leave the WebView alone. It'll automatically re-orient itself as appropriate. Read Handling Runtime Changes for more information about how to handle configuration changes during runtime.The screen density of a device is based on the screen resolution. A screen with low density has fewer available pixels per inch, where a screen with high density has more — sometimes significantly more — pixels per inch. The density of a screen is important because, other things being equal, a UI element (such as a button) whose height and width are defined in terms of screen pixels will appear larger on the lower density screen and smaller on the higher density screen. For simplicity, Android collapses all actual screen densities into three generalized densities: high, medium, and low.By default, WebView scales a web page so that it is drawn at a size that matches the default appearance on a medium density screen. So, it applies 1.5x scaling on a high density screen (because its pixels are smaller) and 0.75x scaling on a low density screen (because its pixels are bigger). Starting with API level ECLAIR, WebView supports DOM, CSS, and meta tag features to help you (as a web developer) target screens with different screen densities.Here's a summary of the features you can use to handle different screen densities:In order to support inline HTML5 video in your application, you need to have hardware acceleration turned on, and set a WebChromeClient. For full screen support, implementations of onShowCustomView(View, WebChromeClient.CustomViewCallback) and onHideCustomView()...
reload Method Overview
Reloads the current URL.
See Also
  • canGoBack
    Gets whether this WebView has a back history item.
  • canGoForward
    Gets whether this WebView has a forward history item.
  • capturePicture
    This method was deprecated in API level 19. Use onDraw(Canvas) to obtain a bitmap snapshot of the WebView, or saveWebArchive(String) to save the content to a file.
  • clearFormData
    Removes the autocomplete popup from the currently focused form field, if present.
  • clearHistory
    Tells this WebView to clear its internal back/forward list.
  • clearMatches
    Clears the highlighting surrounding text matches created by findAllAsync(String).
  • clearSslPreferences
    Clears the SSL preferences table stored in response to proceeding with SSL certificate errors.
  • clearView
    This method was deprecated in API level 18. Use WebView.loadUrl("about:blank") to reliably reset the view state and release page resources (including any running JavaScript).
  • destroy
    Destroys the internal state of this WebView.
  • getScale
    This method was deprecated in API level 17. This method is prone to inaccuracy due to race conditions between the web rendering and UI threads; prefer onScaleChanged(WebView, float, float).
  • getSettings
    Gets the WebSettings object used to control the settings for this WebView.
  • getTitle
    Gets the title for the current page.
  • getUrl
    Gets the URL for the current page.
  • goBack
    Goes back in the history of this WebView.
  • goForward
    Goes forward in the history of this WebView.
  • loadData
    Loads the given data into this WebView using a 'data' scheme URL.
  • loadDataWithBaseURL
    Loads the given data into this WebView, using baseUrl as the base URL for the content.
  • onPause
    Pauses any extra processing associated with this WebView and its associated DOM, plugins, JavaScript etc.
  • onResume
    Resumes a WebView after a previous call to onPause().
  • pauseTimers
    Pauses all layout, parsing, and JavaScript timers for all WebViews.
  • restoreState
    Restores the state of this WebView from the given Bundle.
  • saveState
    Saves the state of this WebView used in onSaveInstanceState(Bundle).
  • setMapTrackballToArrowKeys
    This method was deprecated in API level 17. Only the default case, true, will be supported in a future version.
  • setPictureListener
    This method was deprecated in API level 12. This method is now obsolete.
  • setWebViewClient
    Sets the WebViewClient that will receive various notifications and requests.