Last active
October 24, 2016 20:00
-
-
Save julianfalcionelli/cf94bef4614bdfbc3bf29e97ade60bb4 to your computer and use it in GitHub Desktop.
IcePick Example
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
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