Use case:
Expected behaviour:
My Sunshine app behaviour:
How should we implement this? I'm thinking, as a solution, at Accessibility Events and intercepting them... but this doesn't seem to be right, doesn't seem to be "best practice" (eg creating a Custom View and implement the methods handling these Events)
! Note that the green highlighted list item doesn't seem to be focused ( getCurrentFocused() returns null )
! Note that the list items become focused if we use D-Pad navigation, instead of TalkBack navigation (but this is another discussion...)
LE:
It should work out of the box if you implement stable IDs in your RecyclerView.Adapter
(and potentially disable the ItemAnimator
on the RecyclerView
( rv.setItemAnimator(null)
) which you can do conditionally if TalkBack is enabled).
I ran into the same problem while working on the same project.
Hint: listView.setItemChecked(int position, boolean value);
Good luck :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.