我在我的项目中实现了扩展日历 View (com.tyczj.extendedcalendarview.ExtendedCalendarView)。但是我无法从扩展日历 View 中获取当前日期。我想从日历中获取日、月和年并显示它在另外 3 个 TextView 中。我想在某些特定日期添加事件并更改该特定日期的背景颜色。请帮我找到解决方案
最佳答案
这应该适用于日历:
final Calendar c = Calendar.getInstance();
int year = c.get(Calendar.YEAR);
int month = c.get(Calendar.MONTH);
int day = c.get(Calendar.DAY_OF_MONTH);
关于android - 如何从扩展日历 View android 获取当前日期、月份和年份并将事件添加到特定日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37374400/