~/talk

Handling focus in 2024: supporting different navigation ways with Compose

Talkat AndroidMakers by droidcon 2024 · on Friday, 2024-04-26· at 15:20· [android, accessibility]
name:Tiphaine
github:tahia910
slides:none on file

Covers concrete fixes: Compose requires an explicit visible indicator so adding focusability alone is insufficient and the focusable modifier last in the modifier chain matters; tab order follows declaration order while directional navigation follows the usual four directions; use focusRequester for explicit targets or LocalFocusManager.moveFocus for nearest moves; combinedClickable does not trigger navigation focus so use onKeyEvent instead of combinedClickable to handle keyboard/gamepad actions; respect recommended timeouts via the accessibility manager and test with emulator keyboard or device mirroring.

AI-written summary · about

  1. 0:00Introduction
  2. 1:09Focus navigation importance
  3. 6:22Navigation focus types
  4. 8:05Four focus usability rules
  5. 13:20Common focus issues and fixes
  6. 17:36Focus timeouts and custom views
  7. 19:01Gesture actions and focus
  8. 21:50Focus in Jetpack Compose
  9. 24:00Making composables focusable
  10. 26:32Click actions in Compose focus
  11. 28:42Timeout adjustments for focus
  12. 29:45Skipping elements in focus flow
  13. 30:06Customizing focus order
  14. 31:53Manually moving focus
  15. 34:03Testing navigation focus
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.