1
1
package fr .free .nrw .commons .nearby .fragments ;
2
2
3
- import static fr .free .nrw .commons .contributions .MainActivity .CONTRIBUTIONS_TAB_POSITION ;
4
- import static fr .free .nrw .commons .location .LocationServiceManager .LocationChangeType .LOCATION_SIGNIFICANTLY_CHANGED ;
5
- import static fr .free .nrw .commons .location .LocationServiceManager .LocationChangeType .LOCATION_SLIGHTLY_CHANGED ;
6
- import static fr .free .nrw .commons .location .LocationServiceManager .LocationChangeType .MAP_UPDATED ;
7
- import static fr .free .nrw .commons .nearby .Label .TEXT_TO_DESCRIPTION ;
8
- import static fr .free .nrw .commons .utils .LengthUtils .formatDistanceBetween ;
9
- import static fr .free .nrw .commons .wikidata .WikidataConstants .PLACE_OBJECT ;
10
-
11
3
import android .Manifest ;
12
4
import android .app .AlertDialog ;
13
5
import android .content .BroadcastReceiver ;
19
11
import android .graphics .Bitmap ;
20
12
import android .os .Bundle ;
21
13
import android .provider .Settings ;
22
- import android .text .Html ;
23
- import android .text .method .LinkMovementMethod ;
24
14
import android .util .Log ;
25
15
import android .view .Gravity ;
26
16
import android .view .LayoutInflater ;
36
26
import android .widget .SearchView ;
37
27
import android .widget .TextView ;
38
28
import android .widget .Toast ;
29
+
39
30
import androidx .annotation .NonNull ;
40
31
import androidx .annotation .Nullable ;
41
- import androidx .appcompat .widget .AppCompatTextView ;
42
32
import androidx .recyclerview .widget .DividerItemDecoration ;
43
33
import androidx .recyclerview .widget .LinearLayoutManager ;
44
34
import androidx .recyclerview .widget .RecyclerView ;
45
35
import androidx .vectordrawable .graphics .drawable .VectorDrawableCompat ;
46
- import butterknife .BindView ;
47
- import butterknife .ButterKnife ;
36
+
48
37
import com .google .android .material .bottomsheet .BottomSheetBehavior ;
49
38
import com .google .android .material .chip .Chip ;
50
39
import com .google .android .material .chip .ChipGroup ;
69
58
import com .mapbox .pluginscalebar .ScaleBarOptions ;
70
59
import com .mapbox .pluginscalebar .ScaleBarPlugin ;
71
60
import com .pedrogomez .renderers .RVRendererAdapter ;
61
+
62
+ import fr .free .nrw .commons .utils .DialogUtil ;
63
+ import java .util .ArrayList ;
64
+ import java .util .List ;
65
+ import java .util .concurrent .TimeUnit ;
66
+
67
+ import javax .inject .Inject ;
68
+ import javax .inject .Named ;
69
+
70
+ import butterknife .BindView ;
71
+ import butterknife .ButterKnife ;
72
72
import fr .free .nrw .commons .CommonsApplication ;
73
73
import fr .free .nrw .commons .R ;
74
74
import fr .free .nrw .commons .Utils ;
92
92
import fr .free .nrw .commons .nearby .Place ;
93
93
import fr .free .nrw .commons .nearby .contract .NearbyParentFragmentContract ;
94
94
import fr .free .nrw .commons .nearby .presenter .NearbyParentFragmentPresenter ;
95
- import fr .free .nrw .commons .utils .DialogUtil ;
96
95
import fr .free .nrw .commons .utils .ExecutorUtils ;
97
96
import fr .free .nrw .commons .utils .LayoutUtils ;
98
97
import fr .free .nrw .commons .utils .LocationUtils ;
106
105
import io .reactivex .Observable ;
107
106
import io .reactivex .android .schedulers .AndroidSchedulers ;
108
107
import io .reactivex .schedulers .Schedulers ;
109
- import java .util .ArrayList ;
110
- import java .util .List ;
111
- import java .util .concurrent .TimeUnit ;
112
- import javax .inject .Inject ;
113
- import javax .inject .Named ;
114
108
import timber .log .Timber ;
115
109
110
+ import static fr .free .nrw .commons .contributions .MainActivity .CONTRIBUTIONS_TAB_POSITION ;
111
+ import static fr .free .nrw .commons .location .LocationServiceManager .LocationChangeType .LOCATION_SIGNIFICANTLY_CHANGED ;
112
+ import static fr .free .nrw .commons .location .LocationServiceManager .LocationChangeType .LOCATION_SLIGHTLY_CHANGED ;
113
+ import static fr .free .nrw .commons .location .LocationServiceManager .LocationChangeType .MAP_UPDATED ;
114
+ import static fr .free .nrw .commons .nearby .Label .TEXT_TO_DESCRIPTION ;
115
+ import static fr .free .nrw .commons .utils .LengthUtils .formatDistanceBetween ;
116
+ import static fr .free .nrw .commons .wikidata .WikidataConstants .PLACE_OBJECT ;
117
+
116
118
117
119
public class NearbyParentFragment extends CommonsDaggerSupportFragment
118
120
implements NearbyParentFragmentContract .View ,
@@ -152,8 +154,6 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment
152
154
MapView mapView ;
153
155
@ BindView (R .id .rv_nearby_list )
154
156
RecyclerView rvNearbyList ;
155
- @ BindView (R .id .tv_attribution )
156
- AppCompatTextView tvAttribution ;
157
157
158
158
@ Inject LocationServiceManager locationManager ;
159
159
@ Inject NearbyController nearbyController ;
@@ -236,8 +236,8 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
236
236
UiSettings uiSettings = mapBoxMap .getUiSettings ();
237
237
uiSettings .setCompassGravity (Gravity .BOTTOM | Gravity .LEFT );
238
238
uiSettings .setCompassMargins (12 , 0 , 0 , 24 );
239
- uiSettings .setLogoEnabled (false );
240
- uiSettings .setAttributionEnabled (false );
239
+ uiSettings .setLogoEnabled (true );
240
+ uiSettings .setAttributionEnabled (true );
241
241
uiSettings .setRotateGesturesEnabled (false );
242
242
NearbyParentFragment .this .isMapBoxReady =true ;
243
243
performMapReadyActions ();
@@ -260,9 +260,6 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
260
260
scaleBarPlugin .create (scaleBarOptions );
261
261
});
262
262
});
263
-
264
- tvAttribution .setText (Html .fromHtml (getString (R .string .map_attribution )));
265
- tvAttribution .setMovementMethod (LinkMovementMethod .getInstance ());
266
263
}
267
264
268
265
/**
0 commit comments