Releases: kizitonwose/Calendar
2.1.0
Compose:
- Update compose UI version to 1.3.2
- Use
SnapFlingBehavior
provided by the compose framework for pagination instead of thesnapper
library.
2.0.4
Compose:
Fix: LazyList item applies wrong modifier.
2.0.3
Compose:
- Introduce
ContentHeightMode
enum which determines how the height of the day content is calculated. - Allow
null
header and footer parameters.
View:
- Internal optimizations for
DaySize
behavior implementation.
2.0.2
View:
- Add
rectangle
DaySize option that allows the calendar to fill the parent's size. - Remove the internal view used to wrap the day cells as they are no longer needed.
2.0.1
View:
- The default item animator is no longer used internally, you can set an item animator if desired.
- The footer binder is called after the body content is bound.
2.0.0
What's new:
- Compose support - backed by LazyRow/LazyColumn for efficiency. See the compose documentation.
- A new kind of calendar - HeatMap calendar.
- The library is now published to maven central.
- Total rewrite of the view-based
CalendarView
class with focus on performance. See the new view-based documenatation. The breaking changes are documented below.
Breaking changes in the view-based CalendarView
class:
-
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. -
daySize
property is no longer theSize
class type withheight
andwidth
values. It is now aDaySize
enum with three options -Square
,SeventhWidth
andFreeForm
. Please see theDaySize
enum documentation to understand each value. -
inDateStyle
enum 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. -
outDateStyle
enum property is still available. However, there are now two optionsEndOfRow
andEndOfGrid
. The previously available third optionNone
has been removed. You can simply hide the out-dates if you don't need them. -
scrollMode
enum property is now a boolean type namedscrollPaged
. Set this property tofalse
to have the previousScrollMode.CONTINUOUS
scroll behavior ortrue
to have the previousScrollMode.PAGED
behavior. -
DayOwner
enum has been renamed toDayPosition
. The matching case values are:DayOwner.PREVIOUS_MONTH
=>DayPosition.InDate
DayOwner.THIS_MONTH
=>DayPosition.MonthDate
DayOwner.NEXT_MONTH
=>DayPosition.OutDate
-
maxRowCount
property has been removed as there is now aWeekCalendarView
class that should be used if a week-based calendar is needed. The mainCalendarView
class is used for the month calendar implementation. -
hasBoundaries
property has been removed as it is no longer needed with the introduction of the week and month calendar implementations discussed above. -
monthMarginStart
|monthMarginTop
|monthMarginEnd
|monthMarginBottom
properties have been merged into onemonthMargins
property. -
monthPaddingStart
|monthPaddingTop
|monthPaddingEnd
|monthPaddingBottom
properties have been removed as they provided no real benefit. You can create a custommonthViewClass
and set the paddings there if needed.
1.1.0
1.0.4
1.0.3
- Account for margins in calculating animation height (thanks @caraesten)
1.0.2
- Fix: month height is not adjusted in some cases.