【发布时间】:2018-12-15 15:37:23
【问题描述】:
我在数据库中有几个日期。
我想把这些日期放在我的日历中。背景改变了。取决于其他变量。
现在是一个僵硬的代码
private void colorCalendar(){
String dt = "12122018";
Date date = new Date(dt);
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
String formatted = sdf.format(date);
//calendarView.setSelectionColor();
calendarView.setSelectedDate(LocalDate.parse(formatted));
}
但是错误。
我使用https://github.com/prolificinteractive/material-calendarview 安卓工作室。
但我可以改变它
我指望你的帮助
【问题讨论】:
标签: java android calendar calendarview