Fixed
Status Update
Comments
cl...@google.com <cl...@google.com>
an...@google.com <an...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit fe8be4ddf735bdc120ba658fe62f780a6ab48ae6
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Mon May 04 20:05:40 2020
Restore ScrollerPosition using saved instance state
We just save raw scroller position in pixels. This solution is not ideal as if items have different sizes in portrait and landscape(for example text with wrap content) the restored position could be not pointing on the same item it was before. But it could be good enough for Scroller component. In AdapterList we will have more information about the children and their sizes so we would be able to restore the scroller position smarter there.
Relnote: HorizontalScroller and VerticalScroller not restores their scroll position using saved instance state.
Bug: 155075048
Test: manually, new test
Change-Id: Ia0fae1fe0df60d85302255acb8577cd8e769d297
M ui/integration-tests/src/main/java/androidx/ui/integration/test/foundation/NestedScrollerTestCase.kt
M ui/ui-foundation/api/0.1.0-dev11.txt
M ui/ui-foundation/api/current.txt
M ui/ui-foundation/api/public_plus_experimental_0.1.0-dev11.txt
M ui/ui-foundation/api/public_plus_experimental_current.txt
M ui/ui-foundation/api/restricted_0.1.0-dev11.txt
M ui/ui-foundation/api/restricted_current.txt
M ui/ui-foundation/src/androidTest/java/androidx/ui/foundation/ScrollerTest.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Scroller.kt
https://android-review.googlesource.com/1301975
Branch: androidx-master-dev
commit fe8be4ddf735bdc120ba658fe62f780a6ab48ae6
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Mon May 04 20:05:40 2020
Restore ScrollerPosition using saved instance state
We just save raw scroller position in pixels. This solution is not ideal as if items have different sizes in portrait and landscape(for example text with wrap content) the restored position could be not pointing on the same item it was before. But it could be good enough for Scroller component. In AdapterList we will have more information about the children and their sizes so we would be able to restore the scroller position smarter there.
Relnote: HorizontalScroller and VerticalScroller not restores their scroll position using saved instance state.
Bug: 155075048
Test: manually, new test
Change-Id: Ia0fae1fe0df60d85302255acb8577cd8e769d297
M ui/integration-tests/src/main/java/androidx/ui/integration/test/foundation/NestedScrollerTestCase.kt
M ui/ui-foundation/api/0.1.0-dev11.txt
M ui/ui-foundation/api/current.txt
M ui/ui-foundation/api/public_plus_experimental_0.1.0-dev11.txt
M ui/ui-foundation/api/public_plus_experimental_current.txt
M ui/ui-foundation/api/restricted_0.1.0-dev11.txt
M ui/ui-foundation/api/restricted_current.txt
M ui/ui-foundation/src/androidTest/java/androidx/ui/foundation/ScrollerTest.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Scroller.kt
Description