~/talk

Understanding Compose Text Field

TalkinJapaneseat DroidKaigi 2023 · 2023-09-14..09-16· [android]
links:none on file
slides:none on file

Covers detailed behavior of Jetpack Compose text fields: explains parameter meanings, common pitfalls, and concrete fixes. Demonstrates a custom Material-style field and a 4-digit PIN UI using decorationBox, shows how to enforce a max‑5 character filter without splitting surrogate pairs using Android ICU BreakIterator, and fixes Japanese/Latin line-height jumps by setting lineHeight ≈ 1.5× fontSize with trim and includePadding. Introduces BasicTextField2 (Compose 1.6 alpha) and its new concepts: TextFieldState, TextFieldBuffer, InputTransformation, unified line limits, and improved scroll and code-point handling.

AI-written summary · about

  1. 0:00Text Field API overview
  2. 1:26Basic parameters
  3. 4:43Key parameters deep dive
  4. 14:24Character limit
  5. 21:18Line height and font
  6. 25:56Custom TextField
  7. 28:08State management
  8. 30:19BasicTextField2 introduction
  9. 37:15New API benefits
  10. 38:10Summary
~/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.