Migration Guide
October 15, 2022 ยท View on GitHub
View
1.x.x => 2.x.x
If you're upgrading from version 1.x.x to 2.x.x, please keep in mind that version 2 is a total rewrite of the library with focus on performance. With that in mind, here are the breaking changes:
-
async()methods have been removed as the calendar is now capable of handling really large date ranges without performance issues. The calendar data is generated as needed. The removed methods aresetupAsync()andupdateMonthRangeAsync(). Please use the methodssetup()andupdateMonthData(). -
updateMonthRange()method has been renamed toupdateMonthData()as it now allows you to optionally change the first day of the week if needed. -
daySizeproperty is no longer theSizeclass type withheightandwidthvalues. It is now aDaySizeenum with three options -Square,SeventhWidthandFreeForm. Please see theDaySizeenum documentation to understand each value. -
inDateStyleenum property has been removed as it is now redundant. The in-dates are present in each month data, you can choose to hide them on the view or keep them. -
outDateStyleenum property is still available. However, there are now two optionsEndOfRowandEndOfGrid. The previously available third optionNonehas been removed. You can simply hide the out-dates if you don't need them. -
scrollModeenum property is now a boolean type namedscrollPaged. Set this property tofalseto have the previousScrollMode.CONTINUOUSscroll behavior ortrueto have the previousScrollMode.PAGEDbehavior. -
DayOwnerenum has been renamed toDayPosition. The matching case values are:DayOwner.PREVIOUS_MONTH=>DayPosition.InDateDayOwner.THIS_MONTH=>DayPosition.MonthDateDayOwner.NEXT_MONTH=>DayPosition.OutDate
-
maxRowCountproperty has been removed as there is now aWeekCalendarViewclass that should be used if a week-based calendar is needed. The mainCalendarViewclass is used for the month calendar implementation. -
hasBoundariesproperty has been removed as it is no longer needed with the introduction of the week and month calendar implementations discussed above. -
monthMarginStart|monthMarginTop|monthMarginEnd|monthMarginBottomproperties have been merged into onemonthMarginsproperty. -
monthPaddingStart|monthPaddingTop|monthPaddingEnd|monthPaddingBottomproperties have been removed as they provided no real benefit. You can create a custommonthViewClassand set the paddings there if needed.
0.3.x => 0.4.x / 1.x.x
If you're upgrading from version 0.3.x to 0.4.x or 1.x.x, the main change is that the library moved from using ThreeTenABP to Java 8 API desugaring for dates. After following the new setup instructions, the next thing you need to do is change your imports for date/time related classes from org.threeten.bp.* to java.time.*.
You also need to remove the line AndroidThreeTen.init(this) from the onCreate() method of your application class as it's no longer needed.
Compose
Nothing to see here... yet ๐