0

I've got a ActionBar via ActionBarSherlock, but when I switch from the tab of the chrono, to another. It stops and goes back to 0. When I minimize the app it doesn't stop...

What do I need to save the state? I'm using 4 Button for start, stop, resume, and restart...

Thanks in advance!

moritzg
  • 4,266
  • 3
  • 37
  • 62

1 Answers1

0

You're probably running the timer in the the UI thread. The UI thread is stopped when you move on to another view.
Try using AsyncTask and put the job in background so it runs even if you leave the view itself.

2hamed
  • 8,719
  • 13
  • 69
  • 112