Assigned
Status Update
Comments
ch...@google.com <ch...@google.com>
on...@aol.com <on...@aol.com> #2
We could add an API to make the weighted distance customizable, aosp/3271691 has more info.
on...@aol.com <on...@aol.com> #3
Still the same in 1.7.0-beta07. I'm attaching a screen recording.
It seems that the number of items in the menu is what affects the "focus jump" size (unrelated to the number of items in content).
Can somebody at least confirm if this is a bug or some breaking behavior change, please?
Description
Calling
requestFocus()
on aFocusRequester
attached to a composable outside ofAndroidView
doesn't behave as intended when the focus is currently insideAndroidView
. The focus jumps 4 items down insideAndroidView
on every invocation until there are less than 4 remaining items. It seems to be a regression in 1.7.0 (with 1.6.8, it's working as expected). The same layout in compose is also working as expected (can be switched in the sample app by passingContentType.Compose
toContent
). Changing item height or number of items doesn't seem to affect the "focus jump" size (focus always moves by 4 items).Jetpack Compose version: 1.7.0-beta05
Jetpack Compose component used: UI
Android Studio Build: #AI-241.15989.150.2411.11948838
Kotlin version: 1.9
Sample Project:
Steps to Reproduce:
menuFocusRequester.requestFocus()
)