1
1
package fr .free .nrw .commons .nearby .contract ;
2
2
3
3
import android .content .Context ;
4
-
5
4
import androidx .annotation .Nullable ;
6
5
import com .mapbox .mapboxsdk .annotations .Marker ;
7
-
8
- import fr .free .nrw .commons .location .LocationServiceManager .LocationChangeType ;
9
- import java .util .List ;
10
-
11
6
import fr .free .nrw .commons .kvstore .JsonKvStore ;
12
7
import fr .free .nrw .commons .location .LatLng ;
8
+ import fr .free .nrw .commons .location .LocationServiceManager .LocationChangeType ;
13
9
import fr .free .nrw .commons .nearby .Label ;
14
10
import fr .free .nrw .commons .nearby .NearbyBaseMarker ;
15
11
import fr .free .nrw .commons .nearby .Place ;
12
+ import java .util .List ;
16
13
17
14
public interface NearbyParentFragmentContract {
18
15
19
16
interface View {
17
+
20
18
boolean isNetworkConnectionEstablished ();
19
+
21
20
void listOptionMenuItemClicked ();
21
+
22
22
void populatePlaces (LatLng curlatLng );
23
+
23
24
void populatePlaces (LatLng curlatLng , String customQuery );
25
+
24
26
boolean isListBottomSheetExpanded ();
27
+
25
28
void checkPermissionsAndPerformAction ();
29
+
26
30
void displayLoginSkippedWarning ();
31
+
27
32
void setFABPlusAction (android .view .View .OnClickListener onClickListener );
33
+
28
34
void setFABRecenterAction (android .view .View .OnClickListener onClickListener );
35
+
29
36
void animateFABs ();
37
+
30
38
void recenterMap (LatLng curLatLng );
39
+
31
40
void showLocationOffDialog ();
41
+
32
42
void openLocationSettings ();
43
+
33
44
void hideBottomSheet ();
45
+
34
46
void hideBottomDetailsSheet ();
47
+
35
48
void displayBottomSheetWithInfo (Marker marker );
36
- void addOnCameraMoveListener ();
49
+
37
50
void addSearchThisAreaButtonAction ();
51
+
38
52
void setSearchThisAreaButtonVisibility (boolean isVisible );
53
+
39
54
void setProgressBarVisibility (boolean isVisible );
55
+
40
56
void setTabItemContributions ();
57
+
41
58
boolean isDetailsBottomSheetVisible ();
59
+
42
60
void setBottomSheetDetailsSmaller ();
43
- boolean isSearchThisAreaButtonVisible ();
61
+
44
62
void setRecyclerViewAdapterAllSelected ();
63
+
45
64
void setRecyclerViewAdapterItemsGreyedOut ();
65
+
46
66
void setCheckBoxAction ();
67
+
47
68
void setCheckBoxState (int state );
69
+
48
70
void setFilterState ();
71
+
49
72
void disableFABRecenter ();
73
+
50
74
void enableFABRecenter ();
75
+
51
76
void addCurrentLocationMarker (LatLng curLatLng );
52
77
53
78
void updateMapToTrackPosition (LatLng curLatLng );
54
79
80
+ void clearAllMarkers ();
81
+
55
82
Context getContext ();
56
83
57
84
void updateMapMarkers (List <NearbyBaseMarker > nearbyBaseMarkers , Marker selectedMarker );
@@ -60,7 +87,9 @@ interface View {
60
87
61
88
void displayAllMarkers ();
62
89
63
- void filterMarkersByLabels (List <Label > selectedLabels , boolean existsSelected , boolean needPhotoSelected , boolean wlmSelected , boolean filterForPlaceState , boolean filterForAllNoneType );
90
+ void filterMarkersByLabels (List <Label > selectedLabels , boolean existsSelected ,
91
+ boolean needPhotoSelected , boolean wlmSelected , boolean filterForPlaceState ,
92
+ boolean filterForAllNoneType );
64
93
65
94
LatLng getCameraTarget ();
66
95
@@ -70,10 +99,15 @@ interface View {
70
99
71
100
LatLng getLastLocation ();
72
101
102
+ LatLng getLastMapFocus ();
103
+
104
+ LatLng getMapCenter ();
105
+
106
+ LatLng getMapFocus ();
107
+
73
108
com .mapbox .mapboxsdk .geometry .LatLng getLastFocusLocation ();
74
109
75
110
boolean isCurrentLocationMarkerVisible ();
76
- void setProjectorLatLngBounds ();
77
111
78
112
boolean isAdvancedQueryFragmentVisible ();
79
113
@@ -83,26 +117,35 @@ interface View {
83
117
}
84
118
85
119
interface NearbyListView {
120
+
86
121
void updateListFragment (List <Place > placeList );
87
122
}
88
123
89
124
interface UserActions {
125
+
90
126
void updateMapAndList (LocationChangeType locationChangeType );
127
+
91
128
void lockUnlockNearby (boolean isNearbyLocked );
92
129
93
130
void attachView (View view );
94
131
95
132
void detachView ();
96
133
97
134
void setActionListeners (JsonKvStore applicationKvStore );
135
+
98
136
void removeNearbyPreferences (JsonKvStore applicationKvStore );
137
+
99
138
boolean backButtonClicked ();
139
+
100
140
void onCameraMove (com .mapbox .mapboxsdk .geometry .LatLng latLng );
101
- void filterByMarkerType (List <Label > selectedLabels , int state , boolean filterForPlaceState , boolean filterForAllNoneType );
141
+
142
+ void filterByMarkerType (List <Label > selectedLabels , int state , boolean filterForPlaceState ,
143
+ boolean filterForAllNoneType );
102
144
103
145
void updateMapMarkersToController (List <NearbyBaseMarker > nearbyBaseMarkers );
104
146
105
147
void searchViewGainedFocus ();
148
+
106
149
void setCheckboxUnknown ();
107
150
108
151
void setAdvancedQuery (String query );
0 commit comments