Fixed
Status Update
Comments
cl...@google.com <cl...@google.com> #2
Checked in with Andrey, this is targetting M2 but has no API dependencies so will be fixed in beta stage
ma...@gmail.com <ma...@gmail.com> #3
One thing to mention is that documentation of the androidx.compose.foundation.lazy.LazyListState#animateScrollToItem is misleading.
It implies that scroll offset can be negative, but actually passing negative offset results in an exception
It implies that scroll offset can be negative, but actually passing negative offset results in an exception
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 6e1079c5f2ae341dea746c68a260d71299701ce3
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Wed Nov 24 17:57:14 2021
Support negative offsets in scroll functions on LazyListState
Fixes: 184252837
Test: new tests in LazyScrollTest
Relnote: Now it is allowed to pass negative scroll offsets into LazyListState.scrollToItem() and LazyListState.animateScrollToItem().
Change-Id: Iceb907f268a19db3e9315154ebd136764ad975a3
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/list/LazyListScrollPosition.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyListState.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/list/LazyScrollTest.kt
https://android-review.googlesource.com/1900426
Branch: androidx-main
commit 6e1079c5f2ae341dea746c68a260d71299701ce3
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Wed Nov 24 17:57:14 2021
Support negative offsets in scroll functions on LazyListState
Fixes: 184252837
Test: new tests in LazyScrollTest
Relnote: Now it is allowed to pass negative scroll offsets into LazyListState.scrollToItem() and LazyListState.animateScrollToItem().
Change-Id: Iceb907f268a19db3e9315154ebd136764ad975a3
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/list/LazyListScrollPosition.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyListState.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/list/LazyScrollTest.kt
sh...@gmail.com <sh...@gmail.com> #5
Comment has been deleted.
Description
For example when items have 10 pixels size if we scroll to item 2 with -5 offset it means we should end up in the state where first visible item index is 1 and offset is 5