~/talk

Composing in your Canvas!

Talkat droidcon London 2022 · 2022-10-27..10-28· [android, creative-coding]
slides:none on file

Shows how Jetpack Compose canvas draws real UIs using concrete APIs: drawLine, drawCircle, drawPath and drawArc to build a clickable circular progress indicator that maps a 0–100 progress value to a sweep angle via a 360/100 scale factor, places a draggable thumb by converting atan2 radians to degrees, and reads pointerInput detectTapGestures to get offsets. Also shows using drawContext.nativeCanvas to paint text and recommends scaling dimensions by canvas size; examples live in the repo.

AI-written summary · about

  1. 0:00Introduction and agenda
  2. 3:13Why use Canvas
  3. 6:53Canvas basics in Jetpack Compose
  4. 8:38Drawing lines and circles
  5. 11:50Paths and shapes
  6. 13:41Elementary math for progress bars
  7. 16:13Circular progress bar design
  8. 19:41Adding interactivity with gestures
  9. 24:27Scaling designs across devices
  10. 26:56Accessing native Canvas
  11. 27:38Drawing text on Canvas
  12. 29:04When not to use Canvas
  13. 30:50Closing 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.