~/talk

Write it down: Using text in Jetpack Compose

Talkat droidcon Berlin 2022 · 2022-07-06..07-08· [android]
links:none on file
slides:none on file

Jetpack Compose breaks text into layers: Text -> BasicText -> Paragraph -> platform Java/C++ rendering, and offers downloadable fonts (fetch Google Fonts with device and bundled fallbacks) and new font-padding controls that fix vertical misalignment by setting includeFontPadding = false. Styling uses TextStyle/MaterialTheme and AnnotatedString for spans; clickable annotations work and are accessible. TextField requires synchronous state handling — avoid StateFlow/delays that scramble input and prefer mutableStateOf or hoisted synchronous state. BasicText/basicTextField enable custom behavior when Material components are too limiting.

AI-written summary · about

  1. 0:00Introduction
  2. 1:57Text architecture in Compose
  3. 5:50Text styling basics
  4. 7:14TextStyle and reusability
  5. 13:16Downloading and using fonts
  6. 16:07Vertical text alignment
  7. 23:30Input fields and TextField
  8. 26:40TextField state management
  9. 30:34Multi-styling with AnnotatedString
  10. 34:46Final thoughts and resources
~/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.