#Screenshots
#CalendarView As the CalendarView projects in GitHub seem to be not so much customizable,this CalendarView was born and here is what i achieve.
-
basically,
WeekView
(the title) background color customizable,DayView
text background color customizable -
what exactly important is, DayView click customizable by implementing DayClickListener and calling
setDayClickListener
.both
onDayClick(DayView view, Calendar c, boolean ifRestoring)
andonDayUnClick(DayView view, Calendar c)
hold the instance of the specific dayview, so u can custom whatever click effect u want.CircleColor is a commen click effect as a exmple.So we won't worried about the same issue of circle size and padding when using most calendar view libraries.
Since that
DayView
is extended fromRelativeLayout
, u can add any view u like toDayView
-
both month mode or week mode are introduced
- function event tag added by the interface
MonthEventProvider
andDayEventProvider
;
- fix Utils.getWeekDiff. Why Java Calendar seems so powerless when it comes to calculate difference!Maybe u can take a coffee time to look at joda-time-android if u don't want to be f***ed up.Lol
- happy Fool's Day!Now the CalendarView can make u money per-millis! if u believe me...
- out-of-month day click event
- 6 week size per MonthView
- add MonthViewStyle now u can choose month mode or week mode both in layout or code;
- rewrite the onDayUnClick mechanism
- use RelativeLayout instead of TextView as the container of DayView,so that u can add whatever effect u want to the DayView;
- initiate
mCurrentPosition
inCalendarView
- restore work
- select day by code
- unify
DayView
style - add event num of specific day
switch to week mode,sometimes it cannot navigate to the selected Calendar and unclick seems to be blocked until slide out the 3 limit page of PagerAdapter;2016.4.6override therecreategetItemPosition
method and returnPOSITION_NONE
to force refresh inMonthPagerAdapter
mMonthPagerAdapter
to avoid navigating slide during changing Calendar week mode
week mode crash?what f!2016.4.5 deprecate Utils.ifSameWeek,return fake result in CalendarView. Calendar.setFirstDayOfWeek() seems weird
out-of-month day click event2016.4.1- month collapse to WeekView
- when month view was added to a scrollable view,listen to the scroll state and can smooth collapse to weekview
Just call me FISH!!! I thought 5 week would be the MonthView size. How could I be so stupid on earth!2016.4.1
-
when click,size get smaller2016.3.31becausetrue reason is CalenderView's padding.I used to set the height of TitleView and MonthItem is times of & and the surplus divided to CalenderView's left padding and right padding.Now remove this idea.setBackGround(null)
,may be when set background drawable slide will cause resize -
store day select state2016.3.24 the cache page is only 3 ,so the stored selected DayView in CalendarView is most likely not the same instance after slide back!!!