Created
September 5, 2017 22:28
-
-
Save isaidamier/bbd3b394265f31f5657c4ad7d0a661ef 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
@Override | |
public void onSaveInstanceState(Bundle outState) { | |
outState.putLong(POS_KEY, player.getCurrentPosition()); | |
super.onSaveInstanceState(outState); | |
} | |
@Override | |
public void onRestoreInstanceState(Bundle savedInstanceState) { | |
super.onRestoreInstanceState(savedInstanceState); | |
long position = savedInstanceState.getLong(POS_KEY); | |
player.seekTo(position); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment