In this article, you will learn how the RadCalendarView for Android is structured and what manages its core functionality.
The calendar is constructed using the following elements:
The title holds information about the current display date. It differs according to the current display mode.
The day names are holding the current set of day names in a single week according to the current local.
The fragments are designed to hold a date and being able to snap to each other. This makes them perfect for scrolling. At the point of switching the current date to the previous or the next one, the corresponding
fragment is being updated with the new date and snapped on the opposite side of the current fragment. This virtualization ensures seamless transition between dates, optimizes the use of resources and minimizes the cpu calculations.
In some cases the fragments are not perfectly square and follow the shape of the cells of their current display date. This applies as seen in the picture above. This applies when the calendar is in month display mode, the scrolling is vertical and the scroll mode
is not set to
Stack. When the scroll mode is either
Stack or the scroll direction is horizontal, then the fragments are perfectly rectangular holding dates from both their display date as well as the previous and
the next one as well. This is done to ensure the correct behaviour when the months are 'linked' together in vertical scrolling.
There are several managers that together ensure the proper behaviour of the calendar. They oversee the scrolling, the gestures and the animations.