Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 82dd931988532174c9dacb12d3eb4f123bb3e991
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Thu Nov 26 20:34:18 2020
Add reverseLayout param for LazyColumn/Row
It works similarly how it was working in RecyclerView's LinearLayoutManager. For example for LazyColumn we will layout elements from bottom to top, scrolling will be reversed and and LazyListState.firstVisibleItemIndex == 0 will mean the first item is located at the bottom. It is useful for cases when you implement messenger like list and the more recent messages are located on the bottom.
Test: manually with a new demo, new tests in LazyListsReverseLayoutTest and LazyArrangementsTest
Fixes: 166589935
Relnote: Add reverseLayout param for LazyColumn/Row. when `true` items will be composed from the bottom to the top and LazyListState.firstVisibleItemIndex == 0 will mean the first item is located at the bottom.
Change-Id: I552ae9123cfc426cda2bf2e72784bf07c3c15cbf
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/api/restricted_current.txt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/ListDemos.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyArrangementsTest.kt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyListsReverseLayoutTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyDsl.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyFor.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyGrid.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyList.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyListMeasure.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyMeasuredItem.kt
https://android-review.googlesource.com/1512306
Branch: androidx-master-dev
commit 82dd931988532174c9dacb12d3eb4f123bb3e991
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Thu Nov 26 20:34:18 2020
Add reverseLayout param for LazyColumn/Row
It works similarly how it was working in RecyclerView's LinearLayoutManager. For example for LazyColumn we will layout elements from bottom to top, scrolling will be reversed and and LazyListState.firstVisibleItemIndex == 0 will mean the first item is located at the bottom. It is useful for cases when you implement messenger like list and the more recent messages are located on the bottom.
Test: manually with a new demo, new tests in LazyListsReverseLayoutTest and LazyArrangementsTest
Fixes: 166589935
Relnote: Add reverseLayout param for LazyColumn/Row. when `true` items will be composed from the bottom to the top and LazyListState.firstVisibleItemIndex == 0 will mean the first item is located at the bottom.
Change-Id: I552ae9123cfc426cda2bf2e72784bf07c3c15cbf
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/api/restricted_current.txt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/ListDemos.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyArrangementsTest.kt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyListsReverseLayoutTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyDsl.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyFor.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyGrid.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyList.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyListMeasure.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyMeasuredItem.kt
Description