angcyo
angcyo
https://github.com/angcyo/CalendarView 了解一下?
可以使用我`Fork`的版本. https://github.com/angcyo/CalendarView 使用此方法: ``` com.haibin.calendarview.CalendarView#getCurrentMonthSchemeCalendars ```
已更新. `BaseView` 可以使用 `com.haibin.calendarview.BaseView#getCurrentSchemeCalendars` 方法
https://github.com/angcyo/CalendarView
可以通过`calendar_height`属性, 指定item的高度. `app:calendar_height="100dp"`
周视图下, 判断`isCurrentMonth`无意义. 因为周视图没有`月`的信息, 如果需要判断`isCurrentMonth`, 可以通过`calendar.month == xx`判断.
开启`选择模式`, 使用拦截事件`com.haibin.calendarview.CalendarView#setOnCalendarInterceptListener` 实现拦截方法`com.haibin.calendarview.CalendarView.OnCalendarInterceptListener#onCalendarIntercept` 使用方法`com.haibin.calendarview.Calendar#isCurrentMonth`判断是否在当前月.
滚动到上一个月`com.haibin.calendarview.CalendarView#scrollToPre()` 滚动到下一个月`com.haibin.calendarview.CalendarView#scrollToNext()`
## 周视图直接滚动到`上一个月`或`下一个月` ### `上一个月` ``` int currentItem = mWeekPager.getCurrentItem(); BaseView baseView = mWeekPager.findViewWithTag(currentItem); Calendar firstCalendar = baseView.mItems.get(0); int days = CalendarUtil.getMonthDaysCount(firstCalendar.getYear(), firstCalendar.getMonth()); Calendar targetCalendar = CalendarUtil.getCalendarWidthDiffer(firstCalendar, - days * ONE_DAY);...
参考一下? https://github.com/angcyo/CalendarView