Created
September 15, 2016 06:58
-
-
Save mladenrakonjac/58c1a01f3bc9f335479d8f5edf1c8f1c to your computer and use it in GitHub Desktop.
Example of Contract interface in MVP pattern
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.fleka.deltacity.presentation.shopping; | |
import java.util.List; | |
import me.fleka.deltacity.domain.models.Category; | |
import me.fleka.deltacity.domain.models.Shop; | |
import me.fleka.deltacity.presentation.BasePresenter; | |
import me.fleka.deltacity.presentation.BaseView; | |
/** | |
* Created by mladenrakonjac on 14/09/16. | |
*/ | |
public interface ShoppingContract { | |
interface View extends BaseView<Presenter> { | |
void setLoadingIndicator(boolean active); | |
void showCategories(List<Category> categoryList); | |
void showNoInternetConnection(); | |
void showLoadingCategoriesError(); | |
void showListOfFoundedShopForSearch(List<Shop> shopList); | |
void showNoShopsFound(); | |
} | |
interface Presenter extends BasePresenter { | |
void loadCategories(); | |
void openCategory(int categoryId); | |
void searchShop(String searchText); | |
void openShop(int shopId); | |
void cleanSearch(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment