How to set the calendar in android for particular hour

后端 未结 2 578
忘了有多久
忘了有多久 2020-12-24 12:40

I dont want to add the year or month.Just the hour , minutes and seconds for each day. How to use it the Calendar object to do it ? This is my code

// get a          


        
2条回答
  •  轮回少年
    2020-12-24 13:03

    try using

    calendar.set(Calendar.HOUR_OF_DAY, 4);
    calendar.set(Calendar.MINUTE, 40);
    calendar.set(Calendar.SECOND, 0);
    

提交回复
热议问题