RadCalendarView: Gestures and Transitions

RadCalendarView provides different types of transitions which are played when certain gestures are executed by the user. These gestures can change the display date and display mode of the control. The other way to play transitions are by using the corresponding methods which force animation while changing the display date or display mode.

Handled gestures

RadCalendarView has an intuitive gesture handling mechanism, which allows the user to easily advance to next or previous months (or weeks, or years, depending on the display mode) and change the display mode to Week or Year. If you want to change the list of handled gestures, you can use the calendar's gestureManager(). This manager allows you to disable the handling of some gestures and enabling others. Here's a list of gestures along with the manager's methods that you can use to get or set whether these gestures are enabled:

Scrolling and scroll modes

The calendar is fully suited to be scrolled both horizontally and vertically. It has several different scroll modes giving the freedom of customizing the scroll experience to the customer's needs. The calendar has been optimized so that it follows the user's gestures without delay or unwanted memory performance issues.

The currently provided scroll modes are:

You can use the calendar's properties for setting the direction of the scrolling and the scrolling as follows:

Please have in mind, that in horizontal scrolling the current date will always be snapped regardless of the scroll mode. Also when the calendar is in week display mode, the scrolling will always be horizontal regardless of the settings.

Triggering the transitions programmatically

You can use methods provided by RadCalendarView to change the value of the display date or display mode and apply the corresponding transition. The method changeDisplayMode(CalendarDisplayMode, boolean) can be used to change the display mode with transition between the modes. The first parameter is the display mode that needs to be set and the second parameter specifies whether the transition will be played. Here's an example of a call which sets the display mode to Year with animation between the states:

    calendarView.changeDisplayMode(CalendarDisplayMode.Year, true);
    calendarView.ChangeDisplayMode(CalendarDisplayMode.Year, true);

Similarly you can use the methods animateToNext(boolean) and animateToPrevious(boolean) to change the display date with transition. The current value of the display mode will be used for determination of the new value for the display date. For example, if the current display mode is Year, the new value for display date will be the old with one year added (if animateToNext is used) or subtracted (if animateToPrevious is used). The boolean parameter allows you to determine the direction of the transition. If the provided value is true, the transition will be horizontal and otherwise the transition will be vertical.