rodamora
1/19/2016 - 6:08 PM

MVP on Android

MVP on Android

interface MessageView {
 // View methods should be directives, as the View is just executing orders from the 
// Presenter.

 // Methods for updating the view
 void setMessageBody(String body);
 void setAuthorName(String name);
 void showTranslationButton(boolean shouldShow);

 // Navigation methods
 void goToUserProfile(User user);
}

interface MessagePresenter {
 // Presenter methods should mostly be callbacks, as the View is reporting events for the
// Presenter to evaluate

 // Lifecycle events methods
 void onStart();

 // Input events methods
 void onAuthorClicked();
 void onThreeFingersSwipe();
}