CompactCalendarView
CompactCalendarView copied to clipboard
How to make vertical scroll
I want to display months on vertical scrolling. Is there any attribute to achieve this ? If not how can I make it display on vertical scrolling.
Hi, this actually quite a big change, because basically, you want to scroll in the y axsis. This means drawing stuff based on a y offset rather than the x. I would suggest studying the code and ask any questions here. Hopefully I can answer them.
If you want to get started, I would suggest start by looking at the CompactCalendarController
and look for the usages of accumulatedScrollOffset.x
. This variable essentailly holds how far in the positive or negative direction the user has scrolled. You will need to switch that to accumulatedScrollOffset.y
and start updating this value when ever the user has scrolled in the y axsis (instead of x) and update the drawing method to draw things with an offset based on accumulatedScrollOffset.y
.
If you do this, then you can easily scroll the calendar in the y axsis.
Is it possible to navigate months using Next and Prev button..?