I am trying to use
import android.text.format.Time;
Time startTime = new Time();
startTime.hour = 6;
startTime.minute = 0;
Now after calculations , when I do startTime.minute = startTime.minute + xx and it exceeds 60 min, it wont get to zero and won’t change the hour of startTime.
How can I do that?
You need to check for overflow yourself:
[EDIT]
As @Jmelnik:s answer and @VikramBodicherla:scomment states, you should definitely have a look at the
Calendarclass or something similarly advanced if you are doing something other than the very basic operation you show in your code snippet.