Skip to content Skip to sidebar Skip to footer

Android Countdown Timer Not Working If I Change Values

I am trying to make a program that you enter a number with numberpicker on the first activity and on the second activity there is a countdown timer that uses the number you entered

Solution 1:

Just declare starttimeup and starttime down in starting and initialise them after you get starttime value from 1st activity like:

long starttimeup;
long starttimedown;

And in onCreate:

starttime = Integer.parseInt(timer2string);starttimeup = starttime*60000;starttimedown = starttime*60000;

Post a Comment for "Android Countdown Timer Not Working If I Change Values"