-
- All Implemented Interfaces:
-
androidx.compose.foundation.gestures.ScrollableState
@Stable() public final class CalendarState implements ScrollableStateA state object that can be hoisted to control and observe calendar properties.
This should be created via rememberCalendarState.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classCalendarState.Companion
-
Field Summary
Fields Modifier and Type Field Description private YearMonthstartMonthprivate YearMonthendMonthprivate DayOfWeekfirstDayOfWeekprivate OutDateStyleoutDateStyleprivate final CalendarMonthfirstVisibleMonthprivate final CalendarMonthlastVisibleMonthprivate final CalendarLayoutInfolayoutInfoprivate final InteractionSourceinteractionSourceprivate final BooleanisScrollInProgress
-
Method Summary
Modifier and Type Method Description final YearMonthgetStartMonth()final UnitsetStartMonth(YearMonth startMonth)final YearMonthgetEndMonth()final UnitsetEndMonth(YearMonth endMonth)final DayOfWeekgetFirstDayOfWeek()final UnitsetFirstDayOfWeek(DayOfWeek firstDayOfWeek)final OutDateStylegetOutDateStyle()final UnitsetOutDateStyle(OutDateStyle outDateStyle)final CalendarMonthgetFirstVisibleMonth()The first month that is visible. final CalendarMonthgetLastVisibleMonth()The last month that is visible. final CalendarLayoutInfogetLayoutInfo()final InteractionSourcegetInteractionSource()BooleangetIsScrollInProgress()final UnitscrollToMonth(YearMonth month)Instantly brings the month to the top of the viewport. final UnitanimateScrollToMonth(YearMonth month)Animate (smooth scroll) to the given month. FloatdispatchRawDelta(Float delta)Unitscroll(MutatePriority scrollPriority, SuspendFunction1<ScrollScope, Unit> block)-
-
Method Detail
-
getStartMonth
final YearMonth getStartMonth()
-
setStartMonth
final Unit setStartMonth(YearMonth startMonth)
-
getEndMonth
final YearMonth getEndMonth()
-
setEndMonth
final Unit setEndMonth(YearMonth endMonth)
-
getFirstDayOfWeek
final DayOfWeek getFirstDayOfWeek()
-
setFirstDayOfWeek
final Unit setFirstDayOfWeek(DayOfWeek firstDayOfWeek)
-
getOutDateStyle
final OutDateStyle getOutDateStyle()
-
setOutDateStyle
final Unit setOutDateStyle(OutDateStyle outDateStyle)
-
getFirstVisibleMonth
final CalendarMonth getFirstVisibleMonth()
The first month that is visible.
-
getLastVisibleMonth
final CalendarMonth getLastVisibleMonth()
The last month that is visible.
-
getLayoutInfo
final CalendarLayoutInfo getLayoutInfo()
-
getInteractionSource
final InteractionSource getInteractionSource()
-
getIsScrollInProgress
Boolean getIsScrollInProgress()
-
scrollToMonth
final Unit scrollToMonth(YearMonth month)
Instantly brings the month to the top of the viewport.
- Parameters:
month- the month to which to scroll.
-
animateScrollToMonth
final Unit animateScrollToMonth(YearMonth month)
Animate (smooth scroll) to the given month.
- Parameters:
month- the month to which to scroll.
-
dispatchRawDelta
Float dispatchRawDelta(Float delta)
-
scroll
Unit scroll(MutatePriority scrollPriority, SuspendFunction1<ScrollScope, Unit> block)
-
-
-
-