1
1
package fr .free .nrw .commons .nearby .contract ;
2
2
3
+ import android .content .Context ;
4
+
3
5
import com .mapbox .mapboxsdk .annotations .Marker ;
4
6
import com .mapbox .mapboxsdk .maps .MapboxMap ;
5
7
9
11
import fr .free .nrw .commons .location .LatLng ;
10
12
import fr .free .nrw .commons .location .LocationServiceManager ;
11
13
import fr .free .nrw .commons .nearby .Label ;
14
+ import fr .free .nrw .commons .nearby .NearbyBaseMarker ;
12
15
import fr .free .nrw .commons .nearby .Place ;
16
+ import fr .free .nrw .commons .nearby .presenter .NearbyParentFragmentPresenter ;
13
17
14
18
public interface NearbyParentFragmentContract {
15
19
16
20
interface View {
17
21
void registerLocationUpdates (LocationServiceManager locationServiceManager );
18
22
boolean isNetworkConnectionEstablished ();
19
- void addNetworkBroadcastReceiver ();
20
23
void listOptionMenuItemClicked ();
21
- void populatePlaces (LatLng curlatLng , LatLng searchLatLng );
24
+ void populatePlaces (LatLng curlatLng );
22
25
boolean isListBottomSheetExpanded ();
23
26
void checkPermissionsAndPerformAction (Runnable runnable );
24
27
void displayLoginSkippedWarning ();
@@ -29,7 +32,7 @@ interface View {
29
32
void hideBottomSheet ();
30
33
void hideBottomDetailsSheet ();
31
34
void displayBottomSheetWithInfo (Marker marker );
32
- void addOnCameraMoveListener (MapboxMap . OnCameraMoveListener onCameraMoveListener );
35
+ void addOnCameraMoveListener ();
33
36
void addSearchThisAreaButtonAction ();
34
37
void setSearchThisAreaButtonVisibility (boolean isVisible );
35
38
void setProgressBarVisibility (boolean isVisible );
@@ -44,26 +47,49 @@ interface View {
44
47
void setFilterState ();
45
48
void disableFABRecenter ();
46
49
void enableFABRecenter ();
50
+ void addCurrentLocationMarker (LatLng curLatLng );
51
+
52
+ void updateMapToTrackPosition (LatLng curLatLng );
53
+
54
+ Context getContext ();
55
+
56
+ void updateMapMarkers (List <NearbyBaseMarker > nearbyBaseMarkers , Marker selectedMarker );
57
+
58
+ void filterOutAllMarkers ();
59
+
60
+ void displayAllMarkers ();
61
+
62
+ void filterMarkersByLabels (List <Label > selectedLabels , boolean existsSelected , boolean needPhotoSelected , boolean filterForPlaceState , boolean filterForAllNoneType );
63
+
64
+ LatLng getCameraTarget ();
65
+
66
+ void centerMapToPlace (Place placeToCenter );
67
+
68
+ void updateListFragment (List <Place > placeList );
69
+
70
+ LatLng getLastLocation ();
47
71
}
48
72
49
73
interface NearbyListView {
50
74
void updateListFragment (List <Place > placeList );
51
75
}
52
76
53
77
interface UserActions {
54
- void onTabSelected ();
55
- void checkForPermission ();
56
- void updateMapAndList (LocationServiceManager .LocationChangeType locationChangeType , LatLng cameraTarget );
78
+ void updateMapAndList (LocationServiceManager .LocationChangeType locationChangeType );
57
79
void lockUnlockNearby (boolean isNearbyLocked );
80
+
81
+ void attachView (View view );
82
+
83
+ void detachView ();
84
+
58
85
void setActionListeners (JsonKvStore applicationKvStore );
59
86
void backButtonClicked ();
60
- MapboxMap . OnCameraMoveListener onCameraMove (MapboxMap mapboxMap );
87
+ void onCameraMove (com . mapbox . mapboxsdk . geometry . LatLng latLng );
61
88
void filterByMarkerType (List <Label > selectedLabels , int state , boolean filterForPlaceState , boolean filterForAllNoneType );
89
+
90
+ void updateMapMarkersToController (List <NearbyBaseMarker > nearbyBaseMarkers );
91
+
62
92
void searchViewGainedFocus ();
63
93
void setCheckboxUnknown ();
64
94
}
65
-
66
- interface ViewsAreReadyCallback {
67
- void nearbyFragmentsAreReady ();
68
- }
69
95
}
0 commit comments