Created
December 11, 2016 16:34
-
-
Save nontravis/49d1a29ba99c769ce0bbdac39983fe53 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//In Fragment | |
@Override | |
public void onCreate( @Nullable Bundle savedInstanceState ){ | |
super.onCreate( savedInstanceState ); | |
... | |
if( savedInstanceState != null ){ | |
onRestoreInstanceState( savedInstanceState ); // Restore Instance State here | |
} | |
} | |
@Override | |
public void onSaveInstanceState(Bundle outState) { | |
super.onSaveInstanceState(outState); | |
Bundle saveBundle = new Bundle(); | |
// Save Instance State here | |
outState.putBundle( BUNDLE_SAVE_DATA, saveBundle ); | |
} | |
private void onRestoreInstanceState( Bundle savedInstanceSate ){ | |
Bundle restoreBundle = savedInstanceSate.getBundle( BUNDLE_SAVE_DATA ); | |
// Restore instance state here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment