WebView stopLoading - 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 stopLoading method.

This code example shows how to use the following methods:clearCache, loadUrl, stopLoading
    private void navigate(String url, int timeout) {
        if(url == null) {
            Log.v(LOGTAG, "URL is null, cancelling...");
            finish();
        } 
        webView.stopLoading();
        if(logTime) {
            webView.clearCache(true);
        } 
        startTime = System.currentTimeMillis();
        Log.v(LOGTAG, "Navigating to URL: " + url);
        webView.loadUrl(url);
 
        if(timeout != 0) {
            //set a timer with specified timeout (in ms) 
            handler.sendMessageDelayed(handler.obtainMessage(MSG_TIMEOUT),
                    timeout);
        } 
    } 
 
7
CodeRank
This code example shows how to use the following methods:clearCache, loadUrl, stopLoading
    private void navigate(String url, int timeout) {
        if(url == null) {
            Log.v(LOGTAG, "URL is null, cancelling...");
            finish();
        } 
        webView.stopLoading();
        if(logTime) {
            webView.clearCache(true);
        } 
        startTime = System.currentTimeMillis();
        Log.v(LOGTAG, "Navigating to URL: " + url);
        webView.loadUrl(url);
 
        if(timeout != 0) {
            //set a timer with specified timeout (in ms) 
            handler.sendMessageDelayed(handler.obtainMessage(MSG_TIMEOUT),
                    timeout);
        } 
    } 
 
7
CodeRank
This code example shows how to use the following methods:stopLoading
This code example shows how to use the following methods:clearCache, stopLoading
 
    @Override 
    public void onPause() { 
        super.onPause(); 
        if (wv != null) {
            wv.stopLoading();
            wv.clearCache(true);
        } 
    } 
 
    @Override 
    public void onConfigurationChanged(Configuration newConfig) {
        // ignore orientation change 
        super.onConfigurationChanged(newConfig);
    } 
} 
7
CodeRank
This code example shows how to use the following methods:clearCache, loadUrl, stopLoading
    private void navigate(String url, int timeout) {
        if(url == null) {
            Log.v(LOGTAG, "URL is null, cancelling...");
            finish();
        } 
        webView.stopLoading();
        if(logTime) {
            webView.clearCache(true);
        } 
        startTime = System.currentTimeMillis();
        Log.v(LOGTAG, "Navigating to URL: " + url);
        webView.loadUrl(url);
 
        if(timeout != 0) {
            //set a timer with specified timeout (in ms) 
            handler.sendMessageDelayed(handler.obtainMessage(MSG_TIMEOUT),
                    timeout);
        } 
    } 
 
6
CodeRank
This code example shows how to use the following methods:stopLoading
 
  @Override 
  public void onHiddenChanged(boolean hidden) {
    super.onHiddenChanged(hidden);
    if (hidden)
      viewContentWebView.stopLoading();
    else 
      reload(); 
  } 
 
  public void setUrl(String url) {
    this.url = url;
  } 
 
  public void reload() { 
    if (TextUtils.isEmpty(url))
      return; 
 
    viewContentWebView.loadUrl(url);
  } 
6
CodeRank
This code example shows how to use the following methods:destroy, stopLoading
	public static void APIDestroy() 
	{ 
		NMEWebView.HaxeListenerClass.call0("onDestroyed");
		 
		if(NMEWebView.webView != null) {
			NMEWebView.webView.stopLoading();
			NMEWebView.webView.destroy();
			GameActivity.popView(); 
		} 
		NMEWebView.webView = null;
		NMEWebView.HaxeListenerClass = null;
	} 
} 
6
CodeRank
This code example shows how to use the following methods:clearView, pauseTimers, stopLoading
	} 
 
	@Override 
	protected void onDestroy() { 
		if (browser != null) {
			browser.pauseTimers();
			browser.stopLoading();
			browser.clearView();
		} 
		super.onDestroy(); 
		if (DEBUG)
			Log.d("onDestroy", "destory");
	} 
 
	private void loadCode(boolean noReset) {
		if (GlobalConfig.codeTemp == null) { 
			InputStream inptemp = this.getResources().openRawResource(R.raw.htmltemp);
			Scanner aScanner = new Scanner(inptemp);
			StringBuffer tempBuffer = new StringBuffer();
			while (aScanner.hasNextLine()) {
5
CodeRank
This code example shows how to use the following methods:destroy, setWebChromeClient, setWebViewClient, stopLoading
	 
	@Override 
	protected void onDestroy(){ 
		super.onDestroy(); 
		 
		this.web.stopLoading();
		this.web.setWebChromeClient(null);
		this.web.setWebViewClient(null);
		//this.unregisterForContextMenu(this.web); 
		this.web.destroy();
		this.web = null;
	} 
 
} 
6
CodeRank
This code example shows how to use the following methods:destroy, setWebChromeClient, setWebViewClient, stopLoading
 
	//--------------------------------------------------------------------------------------------------------------------------------------------------------------- 
 
	//WebViewを使用したときのメモリリーク対策 
	public static void releaseWebView(WebView webview){
		webview.stopLoading();
		webview.setWebChromeClient(null);
		webview.setWebViewClient(null);
		webview.destroy();
		webview = null;
	} 
 
	//--------------------------------------------------------------------------------------------------------------------------------------------------------------- 
 
	public static void recordParam(Context con,String key, String value){
		SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(con);
		SharedPreferences.Editor editor = sp.edit();
		editor.putString(key, value);
		editor.commit();
	} 
6
CodeRank

Related WebView stopLoading Questions & Answers:

stopLoading Method Overview
Stops the current load.
See Code Examples for other Android WebView Methods: