Status Update
Comments
el...@google.com <el...@google.com>
yw...@gmail.com <yw...@gmail.com> #2
The issue turns out to be a problem with how the requestFocus()
was being called. in updateFocusRectInWindowSnapshot
, there is a check for isFocused
that should also consider hasFocus()
. The line should be changed from:
if (!view.isFocused) {
to
if (!view.isFocused && !view.hasFocus()) {
da...@google.com <da...@google.com> #3
Resolved the original issues by using the correct rect value. However the focus shouldn't skip focus even with incorrect value. re-open the issue for investigation purpose. Thank you!
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
Author: George Mount <
Link:
Fix requestFocus with bad previous rectangle
Expand for full commit details
Fix requestFocus with bad previous rectangle
Fixes: 388590015
When requestFocus() is called on a ComposeView with a previousRect
set to something that doesn't make sense (empty rectangle from the
wrong direction, for example), the previous behavior would not
find a matching component in that direction. Instead, it would
find the next View to focus on and pass the focus on.
With this CL, if the ComposeView isn't currently focused and a
focusSearch fails to find something focusable in relation to the
previous rectangle, an attempt is made irrespective of the
previous rectangle.
Relnote: "Fixed focus issue where requestFocus() with a
nonsensical previouslyFocusedRect parameter (related to
the focus direction) would skip past a ComposeView."
Test: new test, manual testing
Change-Id: Ifdc2f17b23620d1ae14848624f447f84cc1b0b5d
Files:
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/RequestFocusTest.kt
- M
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
Hash: 8501eec732d61bd71c385a90f58a194191816d57
Date: Fri Jan 10 11:04:59 2025
da...@google.com <da...@google.com>
[Deleted User] <[Deleted User]> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.ui:ui-android:1.8.0-beta01
androidx.compose.ui:ui-jvmstubs:1.8.0-beta01
androidx.compose.ui:ui-linuxx64stubs:1.8.0-beta01
da...@google.com <da...@google.com> #6
Unfortunately the fix did not make it to the alpha12 release, but it will indeed be in the next release.
ri...@ffw.com <ri...@ffw.com> #7
When will this be released? It's more than a month now?
da...@google.com <da...@google.com> #8
Sorry for the delay - Next androidx release is January 29
na...@google.com <na...@google.com> #9
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.room:room-gradle-plugin:2.7.0-alpha13
Description
Version used: 2.7.0-alpha08 to latest 2.7.0-alpha10
Devices/Android versions reproduced on: sdk 35
The Room compiler produces this build error:
Execution failed for task ':app:mergeDebugAndroidTestAssets'.
> The value for task ':app:copyRoomSchemasToAndroidTestAssetsDebugAndroidTest' property 'inputDirectory' is final and cannot be changed any further.
Reverting to Room version 2.7.0-alpha07 solves the issue.
I'm attaching a sample project that reproduces the error. Note that the error happens only by cleaning the build folder beforehand; the first full build with the "Make module" button runs "assembleDebug" and "assembleDebug...Test" tasks but from the second build it only runs "assembleDebug", so the build succeeds.