Skip to content

Instantly share code, notes, and snippets.

@julianfalcionelli
Last active October 24, 2016 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save julianfalcionelli/cf94bef4614bdfbc3bf29e97ade60bb4 to your computer and use it in GitHub Desktop.
Save julianfalcionelli/cf94bef4614bdfbc3bf29e97ade60bb4 to your computer and use it in GitHub Desktop.
IcePick Example
class ExampleActivity extends Activity {
@State int mSelectedPosition; // This will be automatically saved and restored
@Override public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Icepick.restoreInstanceState(this, savedInstanceState);
}
@Override public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
Icepick.saveInstanceState(this, outState);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment