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

This code example shows how to use the following methods:canGoBack, canGoForward, goBack, goForward, reload
 
	} 
 
	@Override 
	public void onClick(View v) {
		if (v.getId() == mBackButton.getId() && mWebView.canGoBack()) { // 上一頁
			mWebView.goBack();
		} else if (v.getId() == mForwardButton.getId() && mWebView.canGoForward()) { // 下一頁
			mWebView.goForward();
		} else if (v.getId() == mRefreshButton.getId()) { // 重新整理
			mWebView.reload();
		} 
	} 
 
} 
6
CodeRank
This code example shows how to use the following methods:getSettings, loadUrl, reload, setWebViewClient
{ 
	public void onCreate(Bundle savedInstanceState)
	{ 
		super.onCreate(savedInstanceState);
 
		WebView webView = new WebView(this);
 
		String url = getIntent().getStringExtra("url");
 
		webView.getSettings().setJavaScriptEnabled(true);
		webView.setWebViewClient(new HelloWebViewClient());
		webView.reload();
 
		webView.loadUrl(url);
 
		setContentView(webView);
	} 
 
	private class HelloWebViewClient extends WebViewClient
7
CodeRank
This code example shows how to use the following methods:scrollTo, getOriginalUrl, loadUrl, reload
	} 
 
	 
	public static void recargar() { 
		 
		viewer.loadUrl("file://" + Environment.getExternalStorageDirectory()
				+ "/myScreenplays/" + "preview" + ".xhtml"); 
		// viewer.loadUrl( "javascript:window.location.reload( true )" ); 
		 
		Log.i(Preview.LOGTAG ,"algo "+"resume "+viewer.getOriginalUrl());
		viewer.reload();
		viewer.scrollTo(scrollX, scrollY);
 
	} 
 
} 
6
CodeRank
This code example shows how to use the following methods:scrollTo, loadUrl, reload
		viewer.reload();
 
	} 
 
	public static void recargar() { 
		viewer.loadUrl("file://" + Environment.getExternalStorageDirectory()
				+ "/myScreenplays/" + "partial_preview" + ".xhtml"); 
		// viewer.loadUrl( "javascript:window.location.reload( true )" ); 
		viewer.reload();
		viewer.scrollTo(scrollX, scrollY);
 
	} 
} 
5
CodeRank
This code example shows how to use the following methods:reload
              Intent i = new Intent(Intent.ACTION_SEND);
              i.setType("message/rfc822");
              i.putExtra(Intent.EXTRA_EMAIL, new String[]{mt.getTo()});
              i.putExtra(Intent.EXTRA_SUBJECT, mt.getSubject());
              context.startActivity(i);
              view.reload();
        } 
        catch (ActivityNotFoundException e) {
          Log.w(TAG, "Problem with Intent.ACTION_SEND", e);
                  new AlertDialog.Builder(context)
                    .setTitle("Contact Info")
                    .setMessage( "Please send your feedback to: app.ocr@gmail.com" )
                    .setPositiveButton( "Done", new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int which) {
                            Log.d("AlertDialog", "Positive");
                        } 
                    }) 
                    .show();
        } 
            return true; 
4
CodeRank
This code example shows how to use the following methods:reload
 			}) 
 			.setNegativeButton("È¡Ïû", null).create().show();
        	 
            return true; 
        case 2: 
        	webview.reload();
            return true; 
        case 3: 
        	 AlertDialog.Builder aa=new AlertDialog.Builder(this); 
             aa.setTitle("ÏûÏ¢Ìáʾ");
             aa.setMessage("È·ÈÏÍ˳ö£¿"); 
//             aa.setIcon(R.drawable.icon); 
             aa.setPositiveButton("È·¶¨",new DialogInterface.OnClickListener() {
                  
                 @Override 
                 public void onClick(DialogInterface dialog, int which) {
                     // TODO Auto-generated method stub 
                     MainActivity.this.finish();
                 } 
             }); 
4
CodeRank
This code example shows how to use the following methods:reload
 	 newsBtReload.setOnClickListener(new OnClickListener() 
     { 
    	public void onClick(View v) 
        {                 
    			 
    		mWebView.reload();
 
    		Toast.makeText(getBaseContext(), 
                    "news reload selected",  
                    Toast.LENGTH_SHORT).show();
 
        } 
    }); 
   	 
    } 
} 
4
CodeRank
This code example shows how to use the following methods:reload
 
        webview.loadUrl(url);
    } 
     
    public void onClickRefresh(View v){
    	webview.reload();
    } 
     
    final Handler handler = new Handler(){
        @Override 
        public void handleMessage(Message msg){ 
            super.handleMessage(msg); 
        } 
    }; 
} 
4
CodeRank
This code example shows how to use the following methods:reload
   public JavaScriptInterface(WebView wv) {
      m_wv = wv;
   } 
 
   public void reload() { 
      m_wv.reload();
   } 
} 
} 
4
CodeRank
This code example shows how to use the following methods:reload
    public void onHomeClick(View v) {
        UIUtils.goHome(this);
    } 
 
    public void onRefreshClick(View v) {
        mWebView.reload();
    } 
 
    public void onSearchClick(View v) {
        UIUtils.goSearch(this);
    } 
     
    @Override 
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if (keyCode == KeyEvent.KEYCODE_BACK && mWebView.canGoBack()) {
            mWebView.goBack();
            return true; 
        } 
        return super.onKeyDown(keyCode, event);
    } 
4
CodeRank

Related WebView reload Questions & Answers:

reload Method Overview
Reloads the current URL.
See Code Examples for other Android WebView Methods: