CompactCalendarView icon indicating copy to clipboard operation
CompactCalendarView copied to clipboard

How to make vertical scroll

Open MadhuriHR opened this issue 8 years ago • 2 comments

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.

MadhuriHR avatar Jul 18 '16 06:07 MadhuriHR

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.

SundeepK avatar Jul 20 '16 09:07 SundeepK

Is it possible to navigate months using Next and Prev button..?

lijusparkt avatar Sep 07 '20 14:09 lijusparkt