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

This code example shows how to use the following methods:getSettings, restoreState, setWebViewClient
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
     
    WebView browser=getBrowser();
     
    browser.setWebViewClient(new RedirectFixer());
    browser.getSettings().setJavaScriptEnabled(true);
     
    if (savedInstanceState!=null) {
      browser.restoreState(savedInstanceState);
    } 
    else if (urlToLoad!=null) {
      loadUrl(urlToLoad);
    } 
  } 
   
  @Override 
  public void onSaveInstanceState(Bundle state) {
    super.onSaveInstanceState(state);
     
8
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getSettings, restoreState, setWebViewClient
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
     
    WebView browser=getBrowser();
     
    browser.setWebViewClient(new RedirectFixer());
    browser.getSettings().setJavaScriptEnabled(true);
     
    if (savedInstanceState!=null) {
      browser.restoreState(savedInstanceState);
    } 
    else if (urlToLoad!=null) {
      loadUrl(urlToLoad);
    } 
  } 
   
  @Override 
  public void onSaveInstanceState(Bundle state) {
    super.onSaveInstanceState(state);
     
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:restoreState
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (savedInstanceState != null && savedInstanceState.containsKey("url"))
            setUri(Uri.parse(savedInstanceState.getString("url")));
        else if (web != null)
            web.restoreState(savedInstanceState);
    } 
 
    @Override 
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        web.restoreState(savedInstanceState);
    } 
 
    @Override 
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        if (web != null)
            web.saveState(outState);
    } 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:restoreState
	} 
 
	@Override 
	protected void onRestoreInstanceState(Bundle savedInstanceState) {
		super.onRestoreInstanceState(savedInstanceState);
		webView.restoreState(savedInstanceState);
	} 
 
	@Override 
	protected void onSaveInstanceState(Bundle outState) {
		super.onSaveInstanceState(outState);
		webView.saveState(outState);
	} 
	 
	@Override 
	protected void onStart() { 
		// TODO Auto-generated method stub 
		super.onStart(); 
	} 
 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:restoreState
/*     */   { 
/*     */     try 
/*     */     { 
/* 250 */       super.onRestoreInstanceState(pSavedInstanceState);
/*     */  
/* 253 */       this.webView.restoreState(pSavedInstanceState);
/*     */     } catch (Exception e) {
/* 255 */       returnResultForInternalSdkError(e);
/*     */     } 
/*     */   } 
/*     */  
/*     */   public void onBackPressed() 
/*     */   { 
/*     */     try 
/*     */     { 
/* 265 */       DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener()
/*     */       { 
/*     */         public void onClick(DialogInterface pDialog, int pDialogResult) {
/* 268 */           if (pDialogResult == -1)
/* 269 */             if (AndroidSDKUtil.networkConnectionActive(MopayActivity.getInstance())) 
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java

Related WebView restoreState Questions & Answers:

restoreState Method Overview
Restores the state of this WebView from the given Bundle.
See Code Examples for other Android WebView Methods: