Android Display date from one week to another like (Thursday to Thursday )

后端 未结 3 1991
轮回少年
轮回少年 2021-01-16 01:30

I have been stuck on this issue for the last two days. My issue is this: how can I display the date from one week to another week (Thursday to Thursday)? For example:

<
3条回答
  •  既然无缘
    2021-01-16 02:21

    In your case, setMaxDate() is your friend. The docs say:

    Sets the maximal date supported by this DatePicker in milliseconds since January 1, 1970 00:00:00 in getDefault() time zone.

    So, get the time of the next week as long and use the method.

    Have a look here Set Limit on the DatePickerDialog in Android?

提交回复
热议问题