After updating to compose 1.7, I’m having focus issues with an
AndroidView
inside a compose hierarchy. If I call
requestFocus()
on a
FocusRequester
attached to a composable outside of the
AndroidView
, the focus jumps to another view inside an
AndroidView
instead of the composable with
FocusRequester
. The jump size seems related to the number of items inside the composable with
FocusRequester
. E.g. if there are 4 items, it jumps by 4 items, if the composable with
FocusRequester
is a
focusGroup()
, it jumps by 1 item. In case of a multiple-item-jump
ViewGroup.requestChildFocus(child, focused)
is called for every child view. I’ve also tried experimenting with
focusProperties
on the
AndroidView
but no luck.
Is there any special setup required since 1.7 or is this a bug?
I’ve already filed an issue with a minimal repro, but no response yet.
https://issuetracker.google.com/issues/352690889