mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Move constracts under contract package
This commit is contained in:
parent
b9d9548126
commit
7dec4af113
3 changed files with 67 additions and 0 deletions
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue