Open RealMoMo opened 3 years ago
<com.haibin.calendarview.CalendarView android:id="@+id/calendarView" android:layout_width="match_parent" android:layout_height="@dimen/calendar_view_width" app:calendar_padding="10dp" app:current_day_lunar_text_color="#ff0000" app:current_day_text_color="#ff0000" app:current_month_lunar_text_color="#CFCFCF" app:current_month_text_color="#333333" app:lunar_text_size="10sp" app:max_year="2050" app:max_year_day="31" app:max_year_month="12" app:min_year="2008" app:min_year_day="1" app:min_year_month="1" app:month_view="xxxxxxx" app:month_view_auto_select_day="last_select_day_ignore_current" app:month_view_show_mode="mode_only_current" app:other_month_lunar_text_color="#e1e1e1" app:other_month_text_color="#e1e1e1" app:scheme_lunar_text_color="#CFCFCF" app:scheme_text="假" app:scheme_text_color="#333" app:scheme_theme_color="#128c4b" app:selected_lunar_text_color="#128c4b" app:selected_text_color="#FFFFFF" app:selected_theme_color="#1F98F8" />
override fun onMonthChange(year: Int, month: Int) { updateScheduleDayInfo(year,month,calendarView.selectedCalendar.day,calendarView.selectedCalendar.week) }
//calendarView.selectedCalendar.week 月份切换星期数有变化,但不对
加了延迟获取才正常
<com.haibin.calendarview.CalendarView android:id="@+id/calendarView" android:layout_width="match_parent" android:layout_height="@dimen/calendar_view_width" app:calendar_padding="10dp" app:current_day_lunar_text_color="#ff0000" app:current_day_text_color="#ff0000" app:current_month_lunar_text_color="#CFCFCF" app:current_month_text_color="#333333" app:lunar_text_size="10sp" app:max_year="2050" app:max_year_day="31" app:max_year_month="12" app:min_year="2008" app:min_year_day="1" app:min_year_month="1" app:month_view="xxxxxxx" app:month_view_auto_select_day="last_select_day_ignore_current" app:month_view_show_mode="mode_only_current" app:other_month_lunar_text_color="#e1e1e1" app:other_month_text_color="#e1e1e1" app:scheme_lunar_text_color="#CFCFCF" app:scheme_text="假" app:scheme_text_color="#333" app:scheme_theme_color="#128c4b" app:selected_lunar_text_color="#128c4b" app:selected_text_color="#FFFFFF" app:selected_theme_color="#1F98F8" />
//calendarView.selectedCalendar.week 月份切换星期数有变化,但不对