11package fr .free .nrw .commons .nearby .fragments ;
22
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+
311import android .Manifest ;
412import android .app .AlertDialog ;
513import android .content .BroadcastReceiver ;
1119import android .graphics .Bitmap ;
1220import android .os .Bundle ;
1321import android .provider .Settings ;
22+ import android .text .Html ;
23+ import android .text .method .LinkMovementMethod ;
1424import android .util .Log ;
1525import android .view .Gravity ;
1626import android .view .LayoutInflater ;
2636import android .widget .SearchView ;
2737import android .widget .TextView ;
2838import android .widget .Toast ;
29-
3039import androidx .annotation .NonNull ;
3140import androidx .annotation .Nullable ;
41+ import androidx .appcompat .widget .AppCompatTextView ;
3242import androidx .recyclerview .widget .DividerItemDecoration ;
3343import androidx .recyclerview .widget .LinearLayoutManager ;
3444import androidx .recyclerview .widget .RecyclerView ;
3545import androidx .vectordrawable .graphics .drawable .VectorDrawableCompat ;
36-
46+ import butterknife .BindView ;
47+ import butterknife .ButterKnife ;
3748import com .google .android .material .bottomsheet .BottomSheetBehavior ;
3849import com .google .android .material .chip .Chip ;
3950import com .google .android .material .chip .ChipGroup ;
5869import com .mapbox .pluginscalebar .ScaleBarOptions ;
5970import com .mapbox .pluginscalebar .ScaleBarPlugin ;
6071import 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 ;
7272import fr .free .nrw .commons .CommonsApplication ;
7373import fr .free .nrw .commons .R ;
7474import fr .free .nrw .commons .Utils ;
9292import fr .free .nrw .commons .nearby .Place ;
9393import fr .free .nrw .commons .nearby .contract .NearbyParentFragmentContract ;
9494import fr .free .nrw .commons .nearby .presenter .NearbyParentFragmentPresenter ;
95+ import fr .free .nrw .commons .utils .DialogUtil ;
9596import fr .free .nrw .commons .utils .ExecutorUtils ;
9697import fr .free .nrw .commons .utils .LayoutUtils ;
9798import fr .free .nrw .commons .utils .LocationUtils ;
105106import io .reactivex .Observable ;
106107import io .reactivex .android .schedulers .AndroidSchedulers ;
107108import 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 ;
108114import timber .log .Timber ;
109115
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-
118116
119117public class NearbyParentFragment extends CommonsDaggerSupportFragment
120118 implements NearbyParentFragmentContract .View ,
@@ -154,6 +152,8 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment
154152 MapView mapView ;
155153 @ BindView (R .id .rv_nearby_list )
156154 RecyclerView rvNearbyList ;
155+ @ BindView (R .id .tv_attribution )
156+ AppCompatTextView tvAttribution ;
157157
158158 @ Inject LocationServiceManager locationManager ;
159159 @ Inject NearbyController nearbyController ;
@@ -236,8 +236,8 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
236236 UiSettings uiSettings = mapBoxMap .getUiSettings ();
237237 uiSettings .setCompassGravity (Gravity .BOTTOM | Gravity .LEFT );
238238 uiSettings .setCompassMargins (12 , 0 , 0 , 24 );
239- uiSettings .setLogoEnabled (true );
240- uiSettings .setAttributionEnabled (true );
239+ uiSettings .setLogoEnabled (false );
240+ uiSettings .setAttributionEnabled (false );
241241 uiSettings .setRotateGesturesEnabled (false );
242242 NearbyParentFragment .this .isMapBoxReady =true ;
243243 performMapReadyActions ();
@@ -260,6 +260,9 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
260260 scaleBarPlugin .create (scaleBarOptions );
261261 });
262262 });
263+
264+ tvAttribution .setText (Html .fromHtml (getString (R .string .map_attribution )));
265+ tvAttribution .setMovementMethod (LinkMovementMethod .getInstance ());
263266 }
264267
265268 /**
0 commit comments