-1

I have a timer in my code. When the screen orientation is changed or when I leave the app with the back button, the timer does not retain the value. Is solved with onPause, onStop, onCreate methods .... but do not know exactly how. What solution might be in each case?

1 Answers1

0

U have to store the time value in onSaveInstanceState, then inside in onCreate u have to reassign saved time value.

user2851150
  • 397
  • 5
  • 12