Figure out a way to handle onActivityResult in views.
Best way is using observables instead of callbacks and request codes in the API. Under the hood obviously codes are needed.
Example:
Observable<Boolean> observable = service.requestPermission(int permission);
Observable<SparseBooleanArray> observable = service.requestPermissions(int... permissions);
Observable<Uri> observable = service.getImageFromUser();confirm(AlertDialog)progress(ProgressDialog or cover view with overlay)alert(Snackbar)
Easy API for showing/hiding notifications.
- Figure out animations
- Figure out how to replace/add screens
- Has an ID
- Has access to
Screen - Injects services via Dagger
- Constructs
Presenterin the constructor - Delegates
onAttachedToWindow/onDetachedFromWindowto presenter - Delegates
onSaveInstanceState/onRestoreInstanceStateto presenter - Has public method
getPresentersoScreenViewcan use it
- Has access to
Viewvia constructor - Has access to
ScreenviaView - Gets all dependencies via constructor parameters
- Knows how to construct the
ScreenView
- Has an ID
- Has access to all
Viewobjects on the screen and calls their or theirPresentermethods - Manages different layout styles (portrait/landscape, phone/tablet, etc)
- Manages
Toolbarand other per-screen elements - If logic gets too complicated, may need to introduce
ScreenViewPresenter