Best code examples for Fragment onSaveInstanceState method (android.app.Fragment.onSaveInstanceState)

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

Fragment onSaveInstanceState examples from Open Source projects
This code example shows how to use the following methods: onSaveInstanceState
		return v;
	} 
	 
	@Override 
	public void onSaveInstanceState(Bundle outState) {
		super.onSaveInstanceState(outState);
		outState.putInt("mColorRes", mColorRes);
	} 
	 
} 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: onSaveInstanceState
    } 
  } 
   
  @Override 
  public void onSaveInstanceState(Bundle state) {
    super.onSaveInstanceState(state);
     
    WebView browser=getBrowser();
     
    if (browser!=null) {
      browser.saveState(state);
    } 
  } 
   
  public void loadUrl(String url) {
    getBrowser().loadUrl(url);
  } 
   
  private WebView getBrowser() {
    return((WebView)(getView().findViewById(R.id.browser)));
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getArguments, onSaveInstanceState
            mPlaylistAdapter.changeCursor(null);
    } 
 
    @Override 
    public void onSaveInstanceState(Bundle outState) {
        outState.putAll(getArguments() != null ? getArguments() : new Bundle());
        super.onSaveInstanceState(outState);
    } 
 
    @Override 
    public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
 
        AdapterContextMenuInfo mi = (AdapterContextMenuInfo)menuInfo;
 
        menu.add(0, PLAY_SELECTION, 0, getResources().getString(R.string.play_all));
 
        if (mi.id >= 0) {
            menu.add(0, RENAME_PLAYLIST, 0, getResources().getString(R.string.rename_playlist));
            menu.add(0, DELETE_PLAYLIST, 0, getResources().getString(R.string.delete_playlist));
        } 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: onSaveInstanceState
	// Called during the lifecycle, when instance state should be saved/restored 
	// //////////////////////////////////////////////////////////////////////////// 
 
	@Override 
	public void onSaveInstanceState(Bundle toSave) {
		super.onSaveInstanceState(toSave);
		Log.i(TAG, "onSaveinstanceState");
	} 
} 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: onSaveInstanceState
     * that contains previously saved states in this method. 
     */ 
    @Override 
    public void onSaveInstanceState(Bundle outState) {
        Log.v(TAG, "onSaveInstanceState");
        super.onSaveInstanceState(outState);
    } 
 
    /** 
     * <blockquote> 
     * ユーザが画面遷移などで {@link Fragment} から去ることを最初に通知するものとして、システムは onPause() を呼び出します。 
     * ただしこれは、即ち {@link Fragment} が破棄されつつあることを意味するものではありません。 
     * ここでは、{@link Activity} の {@link Context} などを超える、永続化すべきデータを保存しておきます(ユーザが戻ってこないこともあるため)。 
     * 
     * onPause() が呼ばれたら、{@link Fragment} はユーザの操作を受け付けなくなります。これは、 {@link Activity#onPause()} が呼ばれた後に 
     * {@link Fragment#onPause()} が呼ばれるため、{@link Activity} もまた操作を受け付けなくなるからです。 
     * </blockquote> 
     * 
     * <blockquote> 
     * The system calls this method as the first indication that the user is leaving the {@link Fragment} 
Full Snippet Info
6
CodeRank
Related Fragment onSaveInstanceState Questions & Answers:
onSaveInstanceState Method Overview
Called to ask the fragment to save its current dynamic state, so it can later be reconstructed in a new instance of its process is restarted.
See Code Examples for other Android Fragment Methods: