Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Hi, thanks for linking me to this issue! When it's expected the cursor handle feature to be included in the library?
ap...@google.com <ap...@google.com> #3
Hi
Currently our focus is on correctness of the existing features and the API. I wouldn't expect this feature to be implemented in the next few months.
ra...@google.com <ra...@google.com>
ab...@gmail.com <ab...@gmail.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 1c6a17a061e7b4a70047224e8f31d3eecb66b5ef
Author: Qingqing Deng <qqd@google.com>
Date: Tue Jun 01 15:45:51 2021
Cursor Handle.
Bug:173016579
Test: ./gradlew test
Test: ./gradlew compose:foundation:foundation:connectedAndroidTest
Test: Manullay tested.
RelNote: Add Cursor Handle.
Change-Id: I07a8217c8ecbcd1c84c1a8df20c6e8b07d409148
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
A compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text/AndroidCursorHandle.android.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/TextFieldSelectionManager.kt
A compose/foundation/foundation/src/desktopMain/kotlin/androidx/compose/foundation/text/DesktopCursorHandle.desktop.kt
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/selection/TextFieldSelectionManagerTest.kt
https://android-review.googlesource.com/1725113
Branch: androidx-main
commit 1c6a17a061e7b4a70047224e8f31d3eecb66b5ef
Author: Qingqing Deng <qqd@google.com>
Date: Tue Jun 01 15:45:51 2021
Cursor Handle.
Bug:173016579
Test: ./gradlew test
Test: ./gradlew compose:foundation:foundation:connectedAndroidTest
Test: Manullay tested.
RelNote: Add Cursor Handle.
Change-Id: I07a8217c8ecbcd1c84c1a8df20c6e8b07d409148
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
A compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text/AndroidCursorHandle.android.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/TextFieldSelectionManager.kt
A compose/foundation/foundation/src/desktopMain/kotlin/androidx/compose/foundation/text/DesktopCursorHandle.desktop.kt
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/selection/TextFieldSelectionManagerTest.kt
Description
Add an API to specify groups of composables that should be treated as a focus group. ie, we give priority to the items within the group before we move focus to items outside the group.
Usecases:
Adjacent lists When we have two scrollable lists next to each other, we want to move focus among all the items of the first list before jumping to the next list. If we don't group all the items in a list into a focus cluster, then from the focus system's perspective the elements in both the lists are treated as siblings, and we move focus purely based on the location of the elements. This can lead to focus search to jump from the first list to the other one list to another before visiting all the items in a given list.
LazyLists When we reach the end of the lazylist, we need to ask the list to compose more items. However, if all the items in the LazyList are not treated as a group, after we visit all the visible items, we could potentially jump out of the list and move focus to another item because the focus system can't distinguish between items in a lazylist and items that are outside it.