SlideShare a Scribd company logo
1 of 41
Download to read offline
A visual introduction
What does it mean to have a Modular UI?
Responsive layouts
Adjust padding and View positions on larger screens
Different item lists on different devices
List presented as Grid on larger screens
Runtime-configurable layouts
Different list arrangement on larger screens
Displaying the same content in different containers
Compress layout vertically
in split-screen scenario
Different navigation on different devices
Architecture & Layering
Android SDK helps.. with some stuff
● Screen sizes: small, normal, large, xlarge
● Screen aspect ratio: long, notlong
● Device orientation: land, port
● Screen densities: ldpi, mdpi, hdpi, xhdpi,
xxhdpi, xxxhdpi
● Density pixels (dp) instead of pixels (px)
● Precise screen sizes: w__dp, h__dp, sw__dp
Phones
Small Tablets (7”, 8”)
Large Tablets
Android layouts
● Less layouts; more styles
● Print and slice UI on paper
● Sub-layouts belong to static containers
● Use phone UI in tablet containers
MVC
Model:View:Controller
● Model - SQLite,
Shared prefs
● View - main_activity.xml,
ListFragment.java
● Controller - MyController.java,
MainActivity.java (don’t)
MVVM
Model:View:ViewModel
● Model - SQLite,
Shared prefs
● View - main_activity.xml,
ViewGroup or View,
AccountListFragment.java
● ViewModel - AccountListFragmentUiModel.java
MVP
Model:View:Presenter
● Model - SQLite,
Shared prefs
● View - main_activity.xml,
ViewGroup or View
● Presenter - MainActivity.java
ListFragment.java
MVP - Variations
Passive View
● View not aware of the Model
● Presenter does the hard work
Supervising Controller
● View interacts directly with the Model
● Presenter handles extreme cases
Components for Android
How we divided
Android components
Lifecycle
● Service, Activity, Fragment, Dialog,
Application - all different
● Create a custom UI entity? I do it anyway
● Unreliability, bugs, appcompat, gotchas
● API levels…
● Fragment caching mechanism…
Solution: Move away from Android APIs?
Fragment lifecycle...
Android Lists with RecyclerView
● Decouple!
● Android: Recycler View, Adapter, Layout
Manager, Item Animator, Item Decorator,
Recycled Pool, Cache, Item Decoration
Advice: Split “adapter” component
(1) data provider and (2) recycler adapter
Recycler overview
Asynchronous work
● UI events must go to a UI thread
● Long operations go on a background thread
● Thread or AsyncTask or RxJava
● Events? Otto or GreenRobot or others
● A swarm of events
Advice: Keep it minimal for your needs
Self-contained UI parts (Pages)
● Keep pages focused on the UI
● Presenters prepare data for pages
● Pages handle dialogs internally
● Complex dialogs? Contain pages inside them
● Persistent presenters or Presenter pool?
Advice: Instantiate in one place
Android Activity
● Context is everywhere
● Difficult to decouple
● Components: LoaderManager, Cursor,
FragmentManager, Fragment backstack,
Fragment caching, Content Providers,
Intents, Menus, etc.
Advice: It’s worth decoupling, try to do it
Intents
● Handle all intents in one place
● Allow the IntentHandler to navigate
● Use an ActivityResolver
● Allow easy Activity switching
Advice: React in onResume() method if possible
Connecting the dots
Rules for a ‘happy’ UI
● Enumerate pages somehow (enum optimized?)
● Pages need a common navigation API
● Framework creates (and caches) pages
● Follow the Activity lifecycle
Example of a ‘happy’ UI code:
navigate().with(myBundle).to(Pages.LOGIN);
Show and hide pages (Page Manager)
● Static containers or dynamic containers
● Watch out: component lifecycles
● Decoupled mechanism for show/hide
● The dark pit of FragmentManager
Advice: Small app - use FragmentManager
Big app - build your own PageManager
Layout and navigation (The Coordinator)
● Decoupled navigation & layout component
● Uses the PageManager to show/hide
● Handles back and “up”
● Holds the IntentHandler component
Advice: Make Coordinator also a page, a
‘super-page’ that holds all other pages
Visible UI on Phones Actual layers on Phones
The Coordinator
Content Page
Navigation drawer page
The Coordinator
Branding bar
List page
Details page
FAB
List Page
Toolbar & menu
List
- Item photo
- Item name
Details Page
Toolbar & menu
Large title
Content
Actual layers on Tablets
Page Modularity
External configuration causes trouble
● A lot of if-else branches in pages
● Custom Views rule the app (learning curve)
Solution: Have a distinct page for each UI
Advice: Create a PageResolver component
Drawbacks
● A lot of decoupling and cosmetic work
● A lot of method references
● Difficult to switch to
● Makes sense only for complex UIs
● Team education
● Limited support (open-source?)
To recap...
● Self-maintained UI components (pages)
● Data is always prepared (presenters)
● Intent handling happens in one place
● Page Resolver helps with modular UIs
● Separate navigation mechanism
● Wrap it all up in a Coordinator
● Have a Coordinator for each screen variant
Finally done.
Modular Android UI
GitHub / Twitter / LinkedIn
@ milosmns
Blog
www.angrybyte.me
Questions?

More Related Content

What's hot

Django: Beyond Basics
Django: Beyond BasicsDjango: Beyond Basics
Django: Beyond Basicsarunvr
 
Introduction to django framework
Introduction to django frameworkIntroduction to django framework
Introduction to django frameworkKnoldus Inc.
 
Building Better AngularJS 1.X Apps With TypeScript
Building Better AngularJS 1.X Apps With TypeScriptBuilding Better AngularJS 1.X Apps With TypeScript
Building Better AngularJS 1.X Apps With TypeScriptColdFusionConference
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Nativedvcrn
 
Clean Architecture
Clean ArchitectureClean Architecture
Clean ArchitectureBadoo
 
React native introduction (Mobile Warsaw)
React native introduction (Mobile Warsaw)React native introduction (Mobile Warsaw)
React native introduction (Mobile Warsaw)Jarek Potiuk
 
[DevDay2018] React Native – Hello World - By: Trung Pham & React Native team ...
[DevDay2018] React Native – Hello World - By: Trung Pham & React Native team ...[DevDay2018] React Native – Hello World - By: Trung Pham & React Native team ...
[DevDay2018] React Native – Hello World - By: Trung Pham & React Native team ...DevDay.org
 
GWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO ToolsGWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO Toolsbarciszewski
 
Intro to Gradle + How to get up to speed
Intro to Gradle + How to get up to speedIntro to Gradle + How to get up to speed
Intro to Gradle + How to get up to speedReid Baker
 
Gradle enabled android project
Gradle enabled android projectGradle enabled android project
Gradle enabled android projectShaka Huang
 
Headless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIsHeadless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIssparkfabrik
 
Building End-to-End Apps Using Typescript
Building End-to-End Apps Using TypescriptBuilding End-to-End Apps Using Typescript
Building End-to-End Apps Using TypescriptGil Fink
 
Counterclockwise past present future
Counterclockwise  past present futureCounterclockwise  past present future
Counterclockwise past present futurelolopetit
 
JHipster, modern web application development made easy
JHipster, modern web application development made easyJHipster, modern web application development made easy
JHipster, modern web application development made easyRaphaël Brugier
 
Say hello to react js - Day 1
Say hello to react js   - Day 1Say hello to react js   - Day 1
Say hello to react js - Day 1Smile Gupta
 
Presentation on octobercms
Presentation on octobercmsPresentation on octobercms
Presentation on octobercmsRamesh Adhikari
 
A/B test your Android build setup with ASPoet
A/B test your Android build setup with ASPoetA/B test your Android build setup with ASPoet
A/B test your Android build setup with ASPoetBoris Farber
 
Intro to Flutter
Intro to FlutterIntro to Flutter
Intro to FlutterEason Pai
 
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...DicodingEvent
 

What's hot (20)

Django: Beyond Basics
Django: Beyond BasicsDjango: Beyond Basics
Django: Beyond Basics
 
Using TypeScript with Angular
Using TypeScript with AngularUsing TypeScript with Angular
Using TypeScript with Angular
 
Introduction to django framework
Introduction to django frameworkIntroduction to django framework
Introduction to django framework
 
Building Better AngularJS 1.X Apps With TypeScript
Building Better AngularJS 1.X Apps With TypeScriptBuilding Better AngularJS 1.X Apps With TypeScript
Building Better AngularJS 1.X Apps With TypeScript
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
Clean Architecture
Clean ArchitectureClean Architecture
Clean Architecture
 
React native introduction (Mobile Warsaw)
React native introduction (Mobile Warsaw)React native introduction (Mobile Warsaw)
React native introduction (Mobile Warsaw)
 
[DevDay2018] React Native – Hello World - By: Trung Pham & React Native team ...
[DevDay2018] React Native – Hello World - By: Trung Pham & React Native team ...[DevDay2018] React Native – Hello World - By: Trung Pham & React Native team ...
[DevDay2018] React Native – Hello World - By: Trung Pham & React Native team ...
 
GWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO ToolsGWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO Tools
 
Intro to Gradle + How to get up to speed
Intro to Gradle + How to get up to speedIntro to Gradle + How to get up to speed
Intro to Gradle + How to get up to speed
 
Gradle enabled android project
Gradle enabled android projectGradle enabled android project
Gradle enabled android project
 
Headless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIsHeadless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIs
 
Building End-to-End Apps Using Typescript
Building End-to-End Apps Using TypescriptBuilding End-to-End Apps Using Typescript
Building End-to-End Apps Using Typescript
 
Counterclockwise past present future
Counterclockwise  past present futureCounterclockwise  past present future
Counterclockwise past present future
 
JHipster, modern web application development made easy
JHipster, modern web application development made easyJHipster, modern web application development made easy
JHipster, modern web application development made easy
 
Say hello to react js - Day 1
Say hello to react js   - Day 1Say hello to react js   - Day 1
Say hello to react js - Day 1
 
Presentation on octobercms
Presentation on octobercmsPresentation on octobercms
Presentation on octobercms
 
A/B test your Android build setup with ASPoet
A/B test your Android build setup with ASPoetA/B test your Android build setup with ASPoet
A/B test your Android build setup with ASPoet
 
Intro to Flutter
Intro to FlutterIntro to Flutter
Intro to Flutter
 
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
 

Viewers also liked

Firefox OS in the development process of a HTML5 app with Cordova
Firefox OS in the development process of a HTML5 app with CordovaFirefox OS in the development process of a HTML5 app with Cordova
Firefox OS in the development process of a HTML5 app with CordovaThomas Dori
 
16 Web & Graphic Design Trends to Watch in 2016
16 Web & Graphic Design Trends to Watch in 201616 Web & Graphic Design Trends to Watch in 2016
16 Web & Graphic Design Trends to Watch in 2016Ernesto Olivares
 
Curriculum meeting 2014
Curriculum meeting 2014Curriculum meeting 2014
Curriculum meeting 2014Holley Stabler
 
20 steps to build an awesome personal brand
20 steps to build an awesome personal brand20 steps to build an awesome personal brand
20 steps to build an awesome personal brandThe Virtual Specialist
 
Horario de las eucaristia
 Horario de las eucaristia Horario de las eucaristia
Horario de las eucaristiaParroquiaCM
 
Distributech 2015 - Mobile Work management
Distributech 2015 - Mobile Work managementDistributech 2015 - Mobile Work management
Distributech 2015 - Mobile Work managementSchneider Electric
 
「Sympathy」 Phantasy Star Online 2の プロシージャルBGMシステム by セガ
「Sympathy」 Phantasy Star Online 2の プロシージャルBGMシステム by セガ「Sympathy」 Phantasy Star Online 2の プロシージャルBGMシステム by セガ
「Sympathy」 Phantasy Star Online 2の プロシージャルBGMシステム by セガManabu Tsuchimoto
 
презентацияна 01.06.13г. (рус.яз)
презентацияна 01.06.13г. (рус.яз)презентацияна 01.06.13г. (рус.яз)
презентацияна 01.06.13г. (рус.яз)Kamilya-81
 
Launch 3 22-38-1
Launch 3 22-38-1Launch 3 22-38-1
Launch 3 22-38-1savomir
 
Как построить энергоэффективный дом?
Как построить энергоэффективный дом?Как построить энергоэффективный дом?
Как построить энергоэффективный дом?kievnovbud
 

Viewers also liked (15)

Firefox OS in the development process of a HTML5 app with Cordova
Firefox OS in the development process of a HTML5 app with CordovaFirefox OS in the development process of a HTML5 app with Cordova
Firefox OS in the development process of a HTML5 app with Cordova
 
16 Web & Graphic Design Trends to Watch in 2016
16 Web & Graphic Design Trends to Watch in 201616 Web & Graphic Design Trends to Watch in 2016
16 Web & Graphic Design Trends to Watch in 2016
 
Cbc p2 saldaña
Cbc p2 saldañaCbc p2 saldaña
Cbc p2 saldaña
 
Curriculum meeting 2014
Curriculum meeting 2014Curriculum meeting 2014
Curriculum meeting 2014
 
Отчет за первое полугодие 2013 года. Департамент науки, промышленной политики...
Отчет за первое полугодие 2013 года. Департамент науки, промышленной политики...Отчет за первое полугодие 2013 года. Департамент науки, промышленной политики...
Отчет за первое полугодие 2013 года. Департамент науки, промышленной политики...
 
20 steps to build an awesome personal brand
20 steps to build an awesome personal brand20 steps to build an awesome personal brand
20 steps to build an awesome personal brand
 
Horario de las eucaristia
 Horario de las eucaristia Horario de las eucaristia
Horario de las eucaristia
 
Distributech 2015 - Mobile Work management
Distributech 2015 - Mobile Work managementDistributech 2015 - Mobile Work management
Distributech 2015 - Mobile Work management
 
「Sympathy」 Phantasy Star Online 2の プロシージャルBGMシステム by セガ
「Sympathy」 Phantasy Star Online 2の プロシージャルBGMシステム by セガ「Sympathy」 Phantasy Star Online 2の プロシージャルBGMシステム by セガ
「Sympathy」 Phantasy Star Online 2の プロシージャルBGMシステム by セガ
 
Dulguun wwwii
Dulguun wwwiiDulguun wwwii
Dulguun wwwii
 
презентацияна 01.06.13г. (рус.яз)
презентацияна 01.06.13г. (рус.яз)презентацияна 01.06.13г. (рус.яз)
презентацияна 01.06.13г. (рус.яз)
 
olproject
olprojectolproject
olproject
 
Launch 3 22-38-1
Launch 3 22-38-1Launch 3 22-38-1
Launch 3 22-38-1
 
BBC foaf talk
BBC foaf talkBBC foaf talk
BBC foaf talk
 
Как построить энергоэффективный дом?
Как построить энергоэффективный дом?Как построить энергоэффективный дом?
Как построить энергоэффективный дом?
 

Similar to Milos Marinkovic "Modular Android UI"

Android design patterns
Android design patternsAndroid design patterns
Android design patternsPlatty Soft
 
Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012Tomáš Kypta
 
Android Jump Start
Android Jump StartAndroid Jump Start
Android Jump StartConFoo
 
Android Workshop Day 2
Android Workshop Day 2Android Workshop Day 2
Android Workshop Day 2Senad Uka
 
Google I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackGoogle I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackSunita Singh
 
Introduction to mobile programming with Androids.
Introduction to mobile programming with Androids. Introduction to mobile programming with Androids.
Introduction to mobile programming with Androids. Maksim Golivkin
 
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...DicodingEvent
 
Android workshop material
Android workshop materialAndroid workshop material
Android workshop materialReza Yogaswara
 
Introducing Honeycomb
Introducing HoneycombIntroducing Honeycomb
Introducing HoneycombCommonsWare
 
ACADGILD:: ANDROID LESSON-How to analyze & manage memory on android like ...
ACADGILD:: ANDROID LESSON-How to analyze & manage memory on android like ...ACADGILD:: ANDROID LESSON-How to analyze & manage memory on android like ...
ACADGILD:: ANDROID LESSON-How to analyze & manage memory on android like ...Padma shree. T
 
Android Lollipop: The developer's perspective
Android Lollipop: The developer's perspectiveAndroid Lollipop: The developer's perspective
Android Lollipop: The developer's perspectiveSebastian Vieira
 
Benefits of using software design patterns and when to use design pattern
Benefits of using software design patterns and when to use design patternBenefits of using software design patterns and when to use design pattern
Benefits of using software design patterns and when to use design patternBeroza Paul
 
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...CybercomChannel
 
Designing and implementing_android_uis_for_phones_and_tablets
Designing and implementing_android_uis_for_phones_and_tabletsDesigning and implementing_android_uis_for_phones_and_tablets
Designing and implementing_android_uis_for_phones_and_tabletsTeddy Koornia
 
Tokamak 4: KDE Plasma Netbook
Tokamak 4: KDE Plasma NetbookTokamak 4: KDE Plasma Netbook
Tokamak 4: KDE Plasma NetbookMarco Martin
 
Android development - the basics, FI MUNI, 2012
Android development - the basics, FI MUNI, 2012Android development - the basics, FI MUNI, 2012
Android development - the basics, FI MUNI, 2012Tomáš Kypta
 
Introduction to Android Development.pptx
Introduction to Android Development.pptxIntroduction to Android Development.pptx
Introduction to Android Development.pptxasmeerana605
 
User experience and interactions design
User experience and interactions design User experience and interactions design
User experience and interactions design Rakesh Jha
 
From React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I startedFrom React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I startedsparkfabrik
 

Similar to Milos Marinkovic "Modular Android UI" (20)

Android design patterns
Android design patternsAndroid design patterns
Android design patterns
 
Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012
 
Android Jump Start
Android Jump StartAndroid Jump Start
Android Jump Start
 
Android Workshop Day 2
Android Workshop Day 2Android Workshop Day 2
Android Workshop Day 2
 
Google I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackGoogle I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and Jetpack
 
Introduction to mobile programming with Androids.
Introduction to mobile programming with Androids. Introduction to mobile programming with Androids.
Introduction to mobile programming with Androids.
 
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
 
Android workshop material
Android workshop materialAndroid workshop material
Android workshop material
 
Android Made Simple
Android Made SimpleAndroid Made Simple
Android Made Simple
 
Introducing Honeycomb
Introducing HoneycombIntroducing Honeycomb
Introducing Honeycomb
 
ACADGILD:: ANDROID LESSON-How to analyze & manage memory on android like ...
ACADGILD:: ANDROID LESSON-How to analyze & manage memory on android like ...ACADGILD:: ANDROID LESSON-How to analyze & manage memory on android like ...
ACADGILD:: ANDROID LESSON-How to analyze & manage memory on android like ...
 
Android Lollipop: The developer's perspective
Android Lollipop: The developer's perspectiveAndroid Lollipop: The developer's perspective
Android Lollipop: The developer's perspective
 
Benefits of using software design patterns and when to use design pattern
Benefits of using software design patterns and when to use design patternBenefits of using software design patterns and when to use design pattern
Benefits of using software design patterns and when to use design pattern
 
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...
 
Designing and implementing_android_uis_for_phones_and_tablets
Designing and implementing_android_uis_for_phones_and_tabletsDesigning and implementing_android_uis_for_phones_and_tablets
Designing and implementing_android_uis_for_phones_and_tablets
 
Tokamak 4: KDE Plasma Netbook
Tokamak 4: KDE Plasma NetbookTokamak 4: KDE Plasma Netbook
Tokamak 4: KDE Plasma Netbook
 
Android development - the basics, FI MUNI, 2012
Android development - the basics, FI MUNI, 2012Android development - the basics, FI MUNI, 2012
Android development - the basics, FI MUNI, 2012
 
Introduction to Android Development.pptx
Introduction to Android Development.pptxIntroduction to Android Development.pptx
Introduction to Android Development.pptx
 
User experience and interactions design
User experience and interactions design User experience and interactions design
User experience and interactions design
 
From React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I startedFrom React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I started
 

More from IT Event

Denis Radin - "Applying NASA coding guidelines to JavaScript or airspace is c...
Denis Radin - "Applying NASA coding guidelines to JavaScript or airspace is c...Denis Radin - "Applying NASA coding guidelines to JavaScript or airspace is c...
Denis Radin - "Applying NASA coding guidelines to JavaScript or airspace is c...IT Event
 
Sara Harkousse - "Web Components: It's all rainbows and unicorns! Is it?"
Sara Harkousse - "Web Components: It's all rainbows and unicorns! Is it?"Sara Harkousse - "Web Components: It's all rainbows and unicorns! Is it?"
Sara Harkousse - "Web Components: It's all rainbows and unicorns! Is it?"IT Event
 
Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...IT Event
 
Roman Romanovsky, Sergey Rak - "JavaScript в IoT "
Roman Romanovsky, Sergey Rak - "JavaScript в IoT "Roman Romanovsky, Sergey Rak - "JavaScript в IoT "
Roman Romanovsky, Sergey Rak - "JavaScript в IoT "IT Event
 
Konstantin Krivlenia - "Continuous integration for frontend"
Konstantin Krivlenia - "Continuous integration for frontend"Konstantin Krivlenia - "Continuous integration for frontend"
Konstantin Krivlenia - "Continuous integration for frontend"IT Event
 
Illya Klymov - "Vue.JS: What did I swap React for in 2017 and why?"
Illya Klymov - "Vue.JS: What did I swap React for in 2017 and why?"Illya Klymov - "Vue.JS: What did I swap React for in 2017 and why?"
Illya Klymov - "Vue.JS: What did I swap React for in 2017 and why?"IT Event
 
Evgeny Gusev - "A circular firing squad: How technologies drag frontend down"
Evgeny Gusev - "A circular firing squad: How technologies drag frontend down"Evgeny Gusev - "A circular firing squad: How technologies drag frontend down"
Evgeny Gusev - "A circular firing squad: How technologies drag frontend down"IT Event
 
Vladimir Grinenko - "Dependencies in component web done right"
Vladimir Grinenko - "Dependencies in component web done right"Vladimir Grinenko - "Dependencies in component web done right"
Vladimir Grinenko - "Dependencies in component web done right"IT Event
 
Dmitry Bartalevich - "How to train your WebVR"
Dmitry Bartalevich - "How to train your WebVR"Dmitry Bartalevich - "How to train your WebVR"
Dmitry Bartalevich - "How to train your WebVR"IT Event
 
Aleksey Bogachuk - "Offline Second"
Aleksey Bogachuk - "Offline Second"Aleksey Bogachuk - "Offline Second"
Aleksey Bogachuk - "Offline Second"IT Event
 
James Allardice - "Building a better login with the credential management API"
James Allardice - "Building a better login with the credential management API"James Allardice - "Building a better login with the credential management API"
James Allardice - "Building a better login with the credential management API"IT Event
 
Fedor Skuratov "Dark Social: as messengers change the market of social media ...
Fedor Skuratov "Dark Social: as messengers change the market of social media ...Fedor Skuratov "Dark Social: as messengers change the market of social media ...
Fedor Skuratov "Dark Social: as messengers change the market of social media ...IT Event
 
Андрей Зайчиков "Архитектура распределенных кластеров NoSQL на AWS"
Андрей Зайчиков "Архитектура распределенных кластеров NoSQL на AWS"Андрей Зайчиков "Архитектура распределенных кластеров NoSQL на AWS"
Андрей Зайчиков "Архитектура распределенных кластеров NoSQL на AWS"IT Event
 
Алексей Рагозин "Java и linux борьба за микросекунды"
Алексей Рагозин "Java и linux борьба за микросекунды"Алексей Рагозин "Java и linux борьба за микросекунды"
Алексей Рагозин "Java и linux борьба за микросекунды"IT Event
 
Volodymyr Lyubinets "Introduction to big data processing with Apache Spark"
Volodymyr Lyubinets "Introduction to big data processing with Apache Spark"Volodymyr Lyubinets "Introduction to big data processing with Apache Spark"
Volodymyr Lyubinets "Introduction to big data processing with Apache Spark"IT Event
 
Наш ответ Uber’у
Наш ответ Uber’уНаш ответ Uber’у
Наш ответ Uber’уIT Event
 
Александр Крашенинников "Hadoop High Availability: опыт Badoo"
Александр Крашенинников "Hadoop High Availability: опыт Badoo"Александр Крашенинников "Hadoop High Availability: опыт Badoo"
Александр Крашенинников "Hadoop High Availability: опыт Badoo"IT Event
 
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
Leonid Vasilyev  "Building, deploying and running production code at Dropbox"Leonid Vasilyev  "Building, deploying and running production code at Dropbox"
Leonid Vasilyev "Building, deploying and running production code at Dropbox"IT Event
 
Анатолий Пласковский "Миллионы карточных платежей за месяц, или как потерять ...
Анатолий Пласковский "Миллионы карточных платежей за месяц, или как потерять ...Анатолий Пласковский "Миллионы карточных платежей за месяц, или как потерять ...
Анатолий Пласковский "Миллионы карточных платежей за месяц, или как потерять ...IT Event
 
Mete Atamel "Resilient microservices with kubernetes"
Mete Atamel "Resilient microservices with kubernetes"Mete Atamel "Resilient microservices with kubernetes"
Mete Atamel "Resilient microservices with kubernetes"IT Event
 

More from IT Event (20)

Denis Radin - "Applying NASA coding guidelines to JavaScript or airspace is c...
Denis Radin - "Applying NASA coding guidelines to JavaScript or airspace is c...Denis Radin - "Applying NASA coding guidelines to JavaScript or airspace is c...
Denis Radin - "Applying NASA coding guidelines to JavaScript or airspace is c...
 
Sara Harkousse - "Web Components: It's all rainbows and unicorns! Is it?"
Sara Harkousse - "Web Components: It's all rainbows and unicorns! Is it?"Sara Harkousse - "Web Components: It's all rainbows and unicorns! Is it?"
Sara Harkousse - "Web Components: It's all rainbows and unicorns! Is it?"
 
Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...
 
Roman Romanovsky, Sergey Rak - "JavaScript в IoT "
Roman Romanovsky, Sergey Rak - "JavaScript в IoT "Roman Romanovsky, Sergey Rak - "JavaScript в IoT "
Roman Romanovsky, Sergey Rak - "JavaScript в IoT "
 
Konstantin Krivlenia - "Continuous integration for frontend"
Konstantin Krivlenia - "Continuous integration for frontend"Konstantin Krivlenia - "Continuous integration for frontend"
Konstantin Krivlenia - "Continuous integration for frontend"
 
Illya Klymov - "Vue.JS: What did I swap React for in 2017 and why?"
Illya Klymov - "Vue.JS: What did I swap React for in 2017 and why?"Illya Klymov - "Vue.JS: What did I swap React for in 2017 and why?"
Illya Klymov - "Vue.JS: What did I swap React for in 2017 and why?"
 
Evgeny Gusev - "A circular firing squad: How technologies drag frontend down"
Evgeny Gusev - "A circular firing squad: How technologies drag frontend down"Evgeny Gusev - "A circular firing squad: How technologies drag frontend down"
Evgeny Gusev - "A circular firing squad: How technologies drag frontend down"
 
Vladimir Grinenko - "Dependencies in component web done right"
Vladimir Grinenko - "Dependencies in component web done right"Vladimir Grinenko - "Dependencies in component web done right"
Vladimir Grinenko - "Dependencies in component web done right"
 
Dmitry Bartalevich - "How to train your WebVR"
Dmitry Bartalevich - "How to train your WebVR"Dmitry Bartalevich - "How to train your WebVR"
Dmitry Bartalevich - "How to train your WebVR"
 
Aleksey Bogachuk - "Offline Second"
Aleksey Bogachuk - "Offline Second"Aleksey Bogachuk - "Offline Second"
Aleksey Bogachuk - "Offline Second"
 
James Allardice - "Building a better login with the credential management API"
James Allardice - "Building a better login with the credential management API"James Allardice - "Building a better login with the credential management API"
James Allardice - "Building a better login with the credential management API"
 
Fedor Skuratov "Dark Social: as messengers change the market of social media ...
Fedor Skuratov "Dark Social: as messengers change the market of social media ...Fedor Skuratov "Dark Social: as messengers change the market of social media ...
Fedor Skuratov "Dark Social: as messengers change the market of social media ...
 
Андрей Зайчиков "Архитектура распределенных кластеров NoSQL на AWS"
Андрей Зайчиков "Архитектура распределенных кластеров NoSQL на AWS"Андрей Зайчиков "Архитектура распределенных кластеров NoSQL на AWS"
Андрей Зайчиков "Архитектура распределенных кластеров NoSQL на AWS"
 
Алексей Рагозин "Java и linux борьба за микросекунды"
Алексей Рагозин "Java и linux борьба за микросекунды"Алексей Рагозин "Java и linux борьба за микросекунды"
Алексей Рагозин "Java и linux борьба за микросекунды"
 
Volodymyr Lyubinets "Introduction to big data processing with Apache Spark"
Volodymyr Lyubinets "Introduction to big data processing with Apache Spark"Volodymyr Lyubinets "Introduction to big data processing with Apache Spark"
Volodymyr Lyubinets "Introduction to big data processing with Apache Spark"
 
Наш ответ Uber’у
Наш ответ Uber’уНаш ответ Uber’у
Наш ответ Uber’у
 
Александр Крашенинников "Hadoop High Availability: опыт Badoo"
Александр Крашенинников "Hadoop High Availability: опыт Badoo"Александр Крашенинников "Hadoop High Availability: опыт Badoo"
Александр Крашенинников "Hadoop High Availability: опыт Badoo"
 
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
Leonid Vasilyev  "Building, deploying and running production code at Dropbox"Leonid Vasilyev  "Building, deploying and running production code at Dropbox"
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
 
Анатолий Пласковский "Миллионы карточных платежей за месяц, или как потерять ...
Анатолий Пласковский "Миллионы карточных платежей за месяц, или как потерять ...Анатолий Пласковский "Миллионы карточных платежей за месяц, или как потерять ...
Анатолий Пласковский "Миллионы карточных платежей за месяц, или как потерять ...
 
Mete Atamel "Resilient microservices with kubernetes"
Mete Atamel "Resilient microservices with kubernetes"Mete Atamel "Resilient microservices with kubernetes"
Mete Atamel "Resilient microservices with kubernetes"
 

Recently uploaded

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 

Recently uploaded (20)

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 

Milos Marinkovic "Modular Android UI"

  • 1.
  • 2. A visual introduction What does it mean to have a Modular UI?
  • 4. Adjust padding and View positions on larger screens
  • 5. Different item lists on different devices
  • 6. List presented as Grid on larger screens
  • 8. Different list arrangement on larger screens
  • 9. Displaying the same content in different containers
  • 10. Compress layout vertically in split-screen scenario
  • 11. Different navigation on different devices
  • 13. Android SDK helps.. with some stuff ● Screen sizes: small, normal, large, xlarge ● Screen aspect ratio: long, notlong ● Device orientation: land, port ● Screen densities: ldpi, mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi ● Density pixels (dp) instead of pixels (px) ● Precise screen sizes: w__dp, h__dp, sw__dp
  • 17. Android layouts ● Less layouts; more styles ● Print and slice UI on paper ● Sub-layouts belong to static containers ● Use phone UI in tablet containers
  • 18. MVC Model:View:Controller ● Model - SQLite, Shared prefs ● View - main_activity.xml, ListFragment.java ● Controller - MyController.java, MainActivity.java (don’t)
  • 19. MVVM Model:View:ViewModel ● Model - SQLite, Shared prefs ● View - main_activity.xml, ViewGroup or View, AccountListFragment.java ● ViewModel - AccountListFragmentUiModel.java
  • 20. MVP Model:View:Presenter ● Model - SQLite, Shared prefs ● View - main_activity.xml, ViewGroup or View ● Presenter - MainActivity.java ListFragment.java
  • 21. MVP - Variations Passive View ● View not aware of the Model ● Presenter does the hard work Supervising Controller ● View interacts directly with the Model ● Presenter handles extreme cases
  • 24. Lifecycle ● Service, Activity, Fragment, Dialog, Application - all different ● Create a custom UI entity? I do it anyway ● Unreliability, bugs, appcompat, gotchas ● API levels… ● Fragment caching mechanism… Solution: Move away from Android APIs?
  • 26. Android Lists with RecyclerView ● Decouple! ● Android: Recycler View, Adapter, Layout Manager, Item Animator, Item Decorator, Recycled Pool, Cache, Item Decoration Advice: Split “adapter” component (1) data provider and (2) recycler adapter
  • 28. Asynchronous work ● UI events must go to a UI thread ● Long operations go on a background thread ● Thread or AsyncTask or RxJava ● Events? Otto or GreenRobot or others ● A swarm of events Advice: Keep it minimal for your needs
  • 29. Self-contained UI parts (Pages) ● Keep pages focused on the UI ● Presenters prepare data for pages ● Pages handle dialogs internally ● Complex dialogs? Contain pages inside them ● Persistent presenters or Presenter pool? Advice: Instantiate in one place
  • 30. Android Activity ● Context is everywhere ● Difficult to decouple ● Components: LoaderManager, Cursor, FragmentManager, Fragment backstack, Fragment caching, Content Providers, Intents, Menus, etc. Advice: It’s worth decoupling, try to do it
  • 31. Intents ● Handle all intents in one place ● Allow the IntentHandler to navigate ● Use an ActivityResolver ● Allow easy Activity switching Advice: React in onResume() method if possible
  • 33. Rules for a ‘happy’ UI ● Enumerate pages somehow (enum optimized?) ● Pages need a common navigation API ● Framework creates (and caches) pages ● Follow the Activity lifecycle Example of a ‘happy’ UI code: navigate().with(myBundle).to(Pages.LOGIN);
  • 34. Show and hide pages (Page Manager) ● Static containers or dynamic containers ● Watch out: component lifecycles ● Decoupled mechanism for show/hide ● The dark pit of FragmentManager Advice: Small app - use FragmentManager Big app - build your own PageManager
  • 35. Layout and navigation (The Coordinator) ● Decoupled navigation & layout component ● Uses the PageManager to show/hide ● Handles back and “up” ● Holds the IntentHandler component Advice: Make Coordinator also a page, a ‘super-page’ that holds all other pages
  • 36. Visible UI on Phones Actual layers on Phones The Coordinator Content Page Navigation drawer page
  • 37. The Coordinator Branding bar List page Details page FAB List Page Toolbar & menu List - Item photo - Item name Details Page Toolbar & menu Large title Content Actual layers on Tablets
  • 38. Page Modularity External configuration causes trouble ● A lot of if-else branches in pages ● Custom Views rule the app (learning curve) Solution: Have a distinct page for each UI Advice: Create a PageResolver component
  • 39. Drawbacks ● A lot of decoupling and cosmetic work ● A lot of method references ● Difficult to switch to ● Makes sense only for complex UIs ● Team education ● Limited support (open-source?)
  • 40. To recap... ● Self-maintained UI components (pages) ● Data is always prepared (presenters) ● Intent handling happens in one place ● Page Resolver helps with modular UIs ● Separate navigation mechanism ● Wrap it all up in a Coordinator ● Have a Coordinator for each screen variant
  • 41. Finally done. Modular Android UI GitHub / Twitter / LinkedIn @ milosmns Blog www.angrybyte.me Questions?