Mortar & Flow - MCE 2015
-
Upload
pierre-yves-ricau -
Category
Engineering
-
view
583 -
download
3
Transcript of Mortar & Flow - MCE 2015
Pierre-Yves Ricau / @Piwai
Mortar & Flow
Fragments
http://corner.squareup.com/2014/10/advocating-against-android-fragments.html
https://www.flickr.com/photos/albaraa/7087660805/
Lessons
• Single Activity Interface • Local Backstack • DIY: activities, views and layout inflater
Backstack
Flow
• Flow = navigation controller & holds backstack • Screen = URL: params + layout
Single Responsibility Principle
Dependency Injection
Boring boilerplate
Dagger
• @Inject • Compile time
Dagger 1
Dagger 2
Best practices
• Custom views • Presenters for business logic • Tests against presenters
Tests
Scoped Singletons
Mortar
• Create and manager scoped object graphs • Lifecycle when you need it
View
ContextWrapper Magic
Presenter with lifecycle
Questions?
@Piwai