You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/Compose.md
+35-3
Original file line number
Diff line number
Diff line change
@@ -422,20 +422,52 @@ fun Day(day: CalendarDay) {
422
422
423
423
-**isScrollInProgress**: Whether this calendar is currently scrolling by gesture, fling, or programmatically.
424
424
425
+
**`YearCalendarState` properties for `HorizontalYearCalendar` and `VerticalYearCalendar`:**
426
+
427
+
-**firstVisibleYear**: The first year that is visible on the calendar.
428
+
429
+
-**lastVisibleYear**: The last year that is visible on the calendar.
430
+
431
+
-**layoutInfo**: A subclass of `LazyListLayoutInfo` calculated during the last layout pass. For example, you can use it to calculate what items are currently visible.
432
+
433
+
-**isScrollInProgress**: Whether this calendar is currently scrolling by gesture, fling, or programmatically.
434
+
425
435
### State methods
426
436
427
-
**`CalendarState` methods:**
437
+
**`CalendarState`**
438
+
439
+
-**scrollToDate(date: LocalDate)**: Instantly scroll to a date on the calendar without an animation.
428
440
429
-
-**scrollToMonth(month: YearMonth)**: Instantly scroll to a specific month on the calendar without an animation.
441
+
-**animateScrollToDate(date: LocalDate)**: Scroll to a date on the calendar with smooth scrolling animation.
442
+
443
+
-**scrollToMonth(month: YearMonth)**: Instantly scroll to a month on the calendar without an animation.
430
444
431
445
-**animateScrollToMonth(month: YearMonth)**: Scroll to a month on the calendar with smooth scrolling animation.
432
446
433
-
**`WeekCalendarState` methods:**
447
+
**`WeekCalendarState`**
448
+
449
+
-**scrollToDate(date: LocalDate)**: Instantly scroll to a date on the calendar without an animation.
450
+
451
+
-**animateScrollToDate(date: LocalDate)**: Scroll to a date on the calendar with smooth scrolling animation.
434
452
435
453
-**scrollToWeek(date: LocalDate)**: Instantly scroll to the week containing the given date on the calendar without an animation.
436
454
437
455
-**animateScrollToWeek(date: LocalDate)**: Scroll to the week containing the given date on the calendar with smooth scrolling animation.
438
456
457
+
**`YearCalendarState`**
458
+
459
+
-**scrollToDate(date: LocalDate)**: Instantly scroll to a date on the calendar without an animation.
460
+
461
+
-**animateScrollToDate(date: LocalDate)**: Scroll to a date on the calendar with smooth scrolling animation.
462
+
463
+
-**scrollToMonth(month: YearMonth)**: Instantly scroll to a month on the calendar without an animation.
464
+
465
+
-**animateScrollToMonth(month: YearMonth)**: Scroll to a month on the calendar with smooth scrolling animation.
466
+
467
+
-**scrollToYear(year: Year)**: Instantly scroll to a year on the calendar without an animation.
468
+
469
+
-**animateScrollToYear(year: Year)**: Scroll to a year on the calendar with smooth scrolling animation.
470
+
439
471
There's no need to repeat the documentation here. Please see the relevant class for all properties and methods available with proper documentation.
All the respective XML attributes listed above are also available as properties of the CalendarView and WeekCalendarView classes so they can be set via code. So in addition to those, we have:
413
413
414
-
**`CalendarView` properties:**
414
+
**`CalendarView`**
415
415
416
416
-**monthScrollListener**: Called when the calendar scrolls to a new month. Mostly beneficial if `scrollPaged` is `true`.
417
417
@@ -423,7 +423,7 @@ All the respective XML attributes listed above are also available as properties
423
423
424
424
-**monthMargins**: The margins, in pixels to be applied on each month view. This can be used to add a space between two months.
425
425
426
-
**`WeekCalendarView` properties:**
426
+
**`WeekCalendarView`**
427
427
428
428
-**weekScrollListener**: Called when the calendar scrolls to a new week. Mostly beneficial if `scrollPaged` is `true`.
429
429
@@ -435,7 +435,7 @@ All the respective XML attributes listed above are also available as properties
435
435
436
436
-**weekMargins**: The margins, in pixels to be applied on each week view. This can be used to add a space between two weeks.
437
437
438
-
**`YearCalendarView` properties:**
438
+
**`YearCalendarView`**
439
439
440
440
-**yearScrollListener**: Called when the calendar scrolls to a new year. Mostly beneficial if `scrollPaged` is `true`.
441
441
@@ -457,7 +457,7 @@ All the respective XML attributes listed above are also available as properties
457
457
458
458
### Methods
459
459
460
-
**`CalendarView` methods:**
460
+
**`CalendarView`**
461
461
462
462
-**scrollToDate(date: LocalDate)**: Scroll to a specific date on the calendar. Use `smoothScrollToDate()` to get a smooth scrolling animation.
463
463
@@ -475,7 +475,7 @@ All the respective XML attributes listed above are also available as properties
475
475
476
476
-**updateMonthData()**: Update the calendar's start month or end month or the first day of week after the initial setup. The currently visible month is preserved. The calendar can handle really large date ranges so you may want to setup the calendar with a large date range instead of updating the range frequently.
477
477
478
-
**`WeekCalendarView` methods:**
478
+
**`WeekCalendarView`**
479
479
480
480
-**scrollToDate(date: LocalDate)**: Scroll to a specific date on the calendar. Use `smoothScrollToDate()` to get a smooth scrolling animation.
481
481
@@ -493,7 +493,7 @@ All the respective XML attributes listed above are also available as properties
493
493
494
494
-**updateWeekData()**: Update the calendar's start date or end date or the first day of week after the initial setup. The currently visible week is preserved. The calendar can handle really large date ranges so you may want to setup the calendar with a large date range instead of updating the range frequently.
495
495
496
-
**`YearCalendarView` methods:**
496
+
**`YearCalendarView`**
497
497
498
498
-**scrollToDate(date: LocalDate)**: Scroll to a specific date on the calendar. Use `smoothScrollToDate()` to get a smooth scrolling animation.
0 commit comments