How to set Java.util.calendar to a specific time period in the future

前端 未结 3 1172
無奈伤痛
無奈伤痛 2021-01-12 10:58

I\'m using Java\'s calendar to set an alarm at a specific date and time. I know how to make this work when the user selects a specific date and time. For example, i

3条回答
  •  無奈伤痛
    2021-01-12 11:12

    You want to look at calendar.add , it will increment the next field if you get overflow.

    http://developer.android.com/reference/java/util/Calendar.html

提交回复
热议问题