~/talk

You've been told lies about Fragments

Talkat Mobius 2017 Piter · 2017-04-21..04-22· [android]
links:none on file
slides:none on file

Fragments produce surprising lifecycle behavior: XML-declared fragments inflate views during activity onCreate while code-added fragments populate in onStart, commitNow vs commit differences cause timing bugs, and ViewPager’s setUserVisibleHint tied to ViewPager fires outside normal lifecycle, while show/hide doesn’t trigger expected pause/stop. The solution explored is switching to Conductor controllers which give synchronous, predictable transactions, nested controllers, instance-ID routing for onActivityResult, and default retention across rotation (Conductor controllers retain across rotations); it works but requires a container view and has a smaller ecosystem.

AI-written summary · about

  1. 0:00Introduction
  2. 0:49Youve been told lies about fragments
  3. 1:54Agenda
  4. 3:04Fragments are bad
  5. 4:07The number of callbacks
  6. 4:42A story of an app
  7. 6:14Whats the problem
  8. 10:08Commit Now
  9. 13:05Fragments in XML
  10. 19:32Lessons learned
  11. 20:50Refactoring
  12. 21:37Advantages
  13. 21:47Custom Views
  14. 21:59Retaining State
  15. 22:28Request Permission StartActivityForResult
  16. 24:07Always use Fragments
  17. 25:50View Fragments
  18. 28:04Stop Operation
  19. 28:19Synchronous Transactions
  20. 29:55Tricks
  21. 30:27Conductor
  22. 31:13Controller Implementation
  23. 33:10Retain to Instance
  24. 34:32Override ViewState
  25. 35:23Demo
  26. 35:57Animations
  27. 36:41TargetController
  28. 40:55ViewPager
  29. 41:05ViewPager Adapter
  30. 41:19ViewPagerCallback
  31. 41:50Disadvantages of Conductor
  32. 42:13Fragments are easier
  33. 42:56Userbase is still not even comparable
  34. 43:38Conclusions
  35. 45:51Use cases
~/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.