mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Add presenter, contract and fragment for parent Fragment of both NearyListFragment and NearbyMapFragment
This commit is contained in:
parent
24aa7a25cc
commit
a1e3b2ef6d
3 changed files with 85 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
||||||
|
package fr.free.nrw.commons.nearby.mvp.contract;
|
||||||
|
|
||||||
|
public interface NearbyParentFragmentContract {
|
||||||
|
|
||||||
|
interface View {
|
||||||
|
void setListFragmentExpanded();
|
||||||
|
void refreshView();
|
||||||
|
}
|
||||||
|
|
||||||
|
interface UserActions {
|
||||||
|
void displayListFragmentExpanded();
|
||||||
|
void locationChangedSlightly();
|
||||||
|
void locationChangedMedium();
|
||||||
|
void locationChangedSignificantly();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
package fr.free.nrw.commons.nearby.mvp.fragments;
|
||||||
|
|
||||||
|
import fr.free.nrw.commons.di.CommonsDaggerSupportFragment;
|
||||||
|
import fr.free.nrw.commons.location.LatLng;
|
||||||
|
import fr.free.nrw.commons.location.LocationUpdateListener;
|
||||||
|
import fr.free.nrw.commons.nearby.mvp.contract.NearbyParentFragmentContract;
|
||||||
|
import fr.free.nrw.commons.wikidata.WikidataEditListener;
|
||||||
|
|
||||||
|
public class NearbyParentFragment extends CommonsDaggerSupportFragment
|
||||||
|
implements LocationUpdateListener,
|
||||||
|
WikidataEditListener.WikidataP18EditListener,
|
||||||
|
NearbyParentFragmentContract.View {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLocationChangedSignificantly(LatLng latLng) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLocationChangedSlightly(LatLng latLng) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLocationChangedMedium(LatLng latLng) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onWikidataEditSuccessful() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setListFragmentExpanded() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void refreshView() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package fr.free.nrw.commons.nearby.mvp.presenter;
|
||||||
|
|
||||||
|
import fr.free.nrw.commons.nearby.mvp.contract.NearbyParentFragmentContract;
|
||||||
|
|
||||||
|
public class NearbyParentFragmetPresenter implements NearbyParentFragmentContract.UserActions {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void displayListFragmentExpanded() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void locationChangedSlightly() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void locationChangedMedium() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void locationChangedSignificantly() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue