8

Runnable stopped when activity is paused

view full story
linux-howto

http://stackoverflow.com – I have a clock done by updating a TextView text using a Runnable. When I'm in the Activity the TextView is updated properly, but when I leave and come back to the activity, the code in the run() method is not executed anymore. Do I have to call run() again in the onResume of my activity? Why? Is the mTicker Runnable stopped? MyActivity.java public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mHandler = new Handler(); mTicker = new Runnable() { public void run() { if(mClockStopped) return; long now = System.curr (HowTos)