-
- All Implemented Interfaces:
-
androidx.compose.foundation.gestures.ScrollableState
@Stable() public final class WeekCalendarState implements ScrollableStateA state object that can be hoisted to control and observe calendar properties.
This should be created via rememberWeekCalendarState.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classWeekCalendarState.Companion
-
Field Summary
Fields Modifier and Type Field Description private LocalDatestartDateprivate LocalDateendDateprivate DayOfWeekfirstDayOfWeekprivate final WeekfirstVisibleWeekprivate final WeeklastVisibleWeekprivate final WeekCalendarLayoutInfolayoutInfoprivate final InteractionSourceinteractionSourceprivate final BooleanisScrollInProgress
-
Method Summary
Modifier and Type Method Description final LocalDategetStartDate()final UnitsetStartDate(LocalDate startDate)final LocalDategetEndDate()final UnitsetEndDate(LocalDate endDate)final DayOfWeekgetFirstDayOfWeek()final UnitsetFirstDayOfWeek(DayOfWeek firstDayOfWeek)final WeekgetFirstVisibleWeek()The first week that is visible. final WeekgetLastVisibleWeek()The last week that is visible. final WeekCalendarLayoutInfogetLayoutInfo()final InteractionSourcegetInteractionSource()BooleangetIsScrollInProgress()final UnitscrollToWeek(LocalDate date)Instantly brings the week containing the given date to the top of the viewport. final UnitanimateScrollToWeek(LocalDate date)Animate (smooth scroll) to the week containing the given date. FloatdispatchRawDelta(Float delta)<ERROR CLASS>scroll(MutatePriority scrollPriority, SuspendFunction1<ScrollScope, Unit> block)-
-
Method Detail
-
getStartDate
final LocalDate getStartDate()
-
setStartDate
final Unit setStartDate(LocalDate startDate)
-
getEndDate
final LocalDate getEndDate()
-
setEndDate
final Unit setEndDate(LocalDate endDate)
-
getFirstDayOfWeek
final DayOfWeek getFirstDayOfWeek()
-
setFirstDayOfWeek
final Unit setFirstDayOfWeek(DayOfWeek firstDayOfWeek)
-
getFirstVisibleWeek
final Week getFirstVisibleWeek()
The first week that is visible.
-
getLastVisibleWeek
final Week getLastVisibleWeek()
The last week that is visible.
-
getLayoutInfo
final WeekCalendarLayoutInfo getLayoutInfo()
-
getInteractionSource
final InteractionSource getInteractionSource()
-
getIsScrollInProgress
Boolean getIsScrollInProgress()
-
scrollToWeek
final Unit scrollToWeek(LocalDate date)
Instantly brings the week containing the given date to the top of the viewport.
- Parameters:
date- the week to which to scroll.
-
animateScrollToWeek
final Unit animateScrollToWeek(LocalDate date)
Animate (smooth scroll) to the week containing the given date.
- Parameters:
date- the week to which to scroll.
-
dispatchRawDelta
Float dispatchRawDelta(Float delta)
-
scroll
<ERROR CLASS> scroll(MutatePriority scrollPriority, SuspendFunction1<ScrollScope, Unit> block)
-
-
-
-