~/talk

Dive into Animate Spans with text and performance

Talkat DroidKaigi 2021 · 2021-10-19..10-21· [android, web-performance]
name:Wakeel
links:none on file
slides:none on file

Line chooses APNG over GIF for full alpha and 24-bit color, then builds an open‑source APNG drawable library in C++/Kotlin that decodes assets and drives frame callbacks into TextView and EditText. Hardware rendering works for TextView; EditText forces software rendering with a limited canvas cache, so fixes include limit height or wrap in ScrollView, precompute text, and limit spans to 100–200 plus only letting the longest-duration animation call invalidate; implementation runs but needs those mitigations for acceptable performance.

AI-written summary · about

  1. 0:00Intro
  2. 0:33Animation Emo
  3. 1:18Introduction
  4. 1:48APNG VS GIF
  5. 2:56What is APNG
  6. 3:35View Rendering
  7. 4:23Control hardware acceleration
  8. 4:51What is Span
  9. 5:35SpannableString
  10. 8:22Drawable.Callback
  11. 8:42Animate span inside TextView
  12. 10:55Problems with TextWatcher and isSelectable
  13. 12:10Solution for TextWatcher
  14. 12:49Cache issue with Software Rendering
  15. 13:18Animate span inside Edit Text
  16. 14:51Software Rendering with Edit Text
  17. 15:18Performance
  18. 15:37Number of Spans
  19. 16:57Rendering Methods
  20. 17:19Conclusion
~/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.