Move constracts under contract package

This commit is contained in:
neslihanturan 2019-05-12 11:08:35 +03:00
parent b9d9548126
commit 7dec4af113
3 changed files with 67 additions and 0 deletions

View file

@ -0,0 +1,24 @@
package fr.free.nrw.commons.nearby.mvp.contract;
/**
* General View and UserAction methods are defined under
* this interface. This interface can be considered parent
* of both NearbyMapContract and NearbyListContract
*/
public interface NearbyContract {
interface View {
void showPlaces();
}
interface UserActions {
void uploadImageGallery();
void uploadImageCamera();
void bookmarkItem();
void getDirections();
void seeWikidataItem();
void seeWikipediaArticle();
void seeCommonsFilePage();
void rotateScreen();
}
}

View file

@ -0,0 +1,20 @@
package fr.free.nrw.commons.nearby.mvp.contract;
import fr.free.nrw.commons.nearby.mvp.contract.NearbyContract;
/**
* This interface defines specific View and UserActions for list
* part of the nearby. On the other hand both extends methods
* from parent View and UserActions where general methods are
* defined (in Nearby Contract)
*/
public interface NearbyListContract {
interface View extends NearbyContract.View {
// Even if this is empty for now, I keep this one for code consistency
}
interface UserActions extends NearbyContract.UserActions {
void expandItem();
}
}

View file

@ -0,0 +1,23 @@
package fr.free.nrw.commons.nearby.mvp.contract;
import fr.free.nrw.commons.nearby.mvp.contract.NearbyContract;
/**
* This interface defines specific View and UserActions for map
* part of the nearby. On the other hand both extends methods
* from parent View and UserActions where general methods are
* defined (in Nearby Contract)
*/
public interface NearbyMapContract {
interface View extends NearbyContract.View{
void showSearchThisAreaButton();
void showInformationBottomSheet();
void showFABs();
}
interface UserActions extends NearbyContract.UserActions {
void searchThisArea();
void recenterMap();
}
}