~/talk

A View State Machine for Network Calls on Android

Talkat KotlinConf 2017 · 2017-11-02..11-03· [android, frontend-architecture, kotlin]
links:none on file
slides:none on file

Kotlin sealed classes implement a single NetworkingViewState sealed class that models init/loading/success/error for UI around network calls, replacing multiple show/hide methods. Data comes from an Rx Observable datastore, presenter emits a state object, activities bind via delegates.notObservable to animate transitions. Formatting moves into small view models so unit tests cover presentation logic. Example app “Game of Cones” compiles, tests run, and the change shrinks required edits from four files down to one.

AI-written summary · about

  1. 0:00Introduction
  2. 0:58What is a View State Machine
  3. 1:19Project Overview
  4. 1:41Data Class
  5. 3:15MVP Architecture
  6. 3:49View Interface
  7. 4:19Presenter
  8. 6:45Update Presenter
  9. 8:13Update View Interface
  10. 10:38Updates
  11. 11:25Build
  12. 12:45Recap
  13. 14:03NetworkingViewState
  14. 16:07Main Presenter
  15. 16:59Main Presenter Update
  16. 18:07View Models
  17. 18:48IceCreamViewModel
  18. 19:47Review
  19. 20:21Activity fragment
  20. 20:36Network view state
  21. 21:35Property delegates
  22. 22:08Delegates not observable
  23. 24:22Property
  24. 24:55Questions
  25. 26:46How does it get initialized
  26. 29:08How to handle multiple view models
~/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.