Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: George Mount <
Link:
Stop crash when moving focus to ComposeView with no focusable content
Expand for full commit details
Stop crash when moving focus to ComposeView with no focusable content
Fixes: 369256395
Fixes: 378570682
Compose advertises itself as focusable. When another View finds the
ComposeView and requests focus on it, it is expected to accept the
focus and can crash if it doesn't. This CL returns true when that
happens and tries to move focus to the next item if possible.
When moving focus between ComposeViews using "Tab," the
focus was not changing. This CL fixes that problem.
Test: new test, manual testing
Change-Id: I372b6974e1b4714f825c208e683aea8d50e19116
Files:
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/FocusViewInteropTest.kt
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/OwnerFocusTest.kt
- M
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
- A
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/FocusFinderCompat.android.kt
- M
compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/focus/FocusOwnerImpl.kt
Hash: 5926b31e4bd68cee82f84f42d7223765329988b8
Date: Fri Nov 01 15:50:10 2024
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
Author: George Mount <
Link:
Fix several focus issues
Expand for full commit details
Fix several focus issues
Fixes: 369256395
Fixes: 378570682
Fixes: 376142752
Relnote: "Fixed several focus-related issues, including
crashes when IME tries to focus on ComposeView without
focusable items, focus change within child AndroidViews,
and focus request leaving an AndroidView."
Allow focus to leave AndroidView using requestFocus()
When requestFocus() is called to move focus from an
Android View within Compose to a compose focus requester,
the ComposeView should be focused and the focus target
should have focus.
This CL moves the functionality for moving focus
between child Views to the key handler, moveFocus(),
and requestFocus().
Test: new test, manual test
Change-Id: Ia03c3c04dc9fd9d55d8fcae6b15e15cb2384f467
Files:
- M
compose/ui/ui/api/current.txt
- M
compose/ui/ui/api/restricted_current.txt
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/FocusViewInteropTest.kt
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/OwnerFocusTest.kt
- M
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
- A
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/FocusFinderCompat.android.kt
- M
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/viewinterop/AndroidViewHolder.android.kt
- M
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/viewinterop/FocusGroupNode.android.kt
- M
compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/ComposeUiFlags.kt
- M
compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/focus/FocusOwnerImpl.kt
- M
compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/focus/FocusTransactions.kt
Hash: 1467e40d3c1253ebb6e3b54f9bfdcdc93ef53da7
Date: Mon Dec 02 18:21:31 2024
pr...@google.com <pr...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.ui:ui:1.8.0-alpha07
androidx.compose.ui:ui-android:1.8.0-alpha07
androidx.compose.ui:ui-jvmstubs:1.8.0-alpha07
androidx.compose.ui:ui-linuxx64stubs:1.8.0-alpha07
pr...@google.com <pr...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.ui:ui:1.8.0-alpha08
androidx.compose.ui:ui-android:1.8.0-alpha08
androidx.compose.ui:ui-jvmstubs:1.8.0-alpha08
androidx.compose.ui:ui-linuxx64stubs:1.8.0-alpha08
Description
Jetpack Compose component used: AndroidView, Focus
Android Studio Build: uild #AI-233.14808.21.2331.11574862
Kotlin version: Latest
Steps to Reproduce or Code Sample to Reproduce:
1. See attached zip file for the demo repro.
2. Also see attached image diagram to demonstrate what the minimum requirement to trigger the issues