Open wyq01 opened 7 years ago
在周历的监听器mWeekCalendarClickListener的onClickDate以及onPageChange方法的最后添加 resetCalendarPosition(); 重置月历的位置
thanks
@wyq01
@Override public void onClickDate(int year, int month, int day) { mcvCalendar.setOnCalendarClickListener(null); int months = CalendarUtils.getMonthsAgo(mCurrentSelectYear, mCurrentSelectMonth, year, month); resetCurrentSelectDate(year, month, day); if (months != 0) { int position = mcvCalendar.getCurrentItem() + months; mcvCalendar.setCurrentItem(position, false); } resetMonthView(); mcvCalendar.setOnCalendarClickListener(mMonthCalendarClickListener); resetCalendarPosition(); }
@Override
public void onPageChange(int year, int month, int day) {
if (mIsAutoChangeMonthRow) {
if (mCurrentSelectMonth != month) {
mCurrentRowsIsSix = CalendarUtils.getMonthRows(year, month) == 6;
}
}
resetCalendarPosition();
}
是这样吗?
是的
ScheduleLayout类的第420代码: int row = monthView.getWeekRow() - 1; 改为: int row = CalendarUtils.getWeekRow(monthView.getSelectYear(), monthView.getSelectMonth(), monthView.getSelectDay()); 这段你忘了改
现在应该是421行 这行不改 bug修复不了
@wyq01 你最好说明一下bug如何重现
在周历页面进行翻页,翻到跨月份的那周时下拉,拉出月历
建议将ScheduleLayout类的第420代码: int row = monthView.getWeekRow() - 1; 改为: int row = CalendarUtils.getWeekRow(monthView.getSelectYear(), monthView.getSelectMonth(), monthView.getSelectDay()); 用以解决在周历跨月份翻页时,月历位置计算不准确导致下拉月历出现位置错位的BUG。