From f1d4127ace606939dc76869cf27562b6f3b122b0 Mon Sep 17 00:00:00 2001 From: ChaosKid42 Date: Sat, 11 Jan 2020 15:25:58 +0100 Subject: [PATCH] simplify osm attribution (#3613) --- .../eu/siacs/conversations/ui/LocationActivity.java | 4 +++- .../conversations/ui/ShareLocationActivity.java | 4 ---- src/main/res/layout/activity_share_location.xml | 12 ------------ src/main/res/values/colors.xml | 1 - src/main/res/values/strings.xml | 1 - 5 files changed, 3 insertions(+), 19 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/LocationActivity.java b/src/main/java/eu/siacs/conversations/ui/LocationActivity.java index 80fb8983a..eb11e5a74 100644 --- a/src/main/java/eu/siacs/conversations/ui/LocationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/LocationActivity.java @@ -27,6 +27,7 @@ import org.osmdroid.tileprovider.tilesource.TileSourceFactory; import org.osmdroid.util.GeoPoint; import org.osmdroid.views.CustomZoomButtonsController; import org.osmdroid.views.MapView; +import org.osmdroid.views.overlay.CopyrightOverlay; import org.osmdroid.views.overlay.Overlay; import java.io.IOException; @@ -71,7 +72,7 @@ public abstract class LocationActivity extends ActionBarActivity implements Loca protected void updateLocationMarkers() { clearMarkers(); } - + @Override protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -130,6 +131,7 @@ public abstract class LocationActivity extends ActionBarActivity implements Loca protected void setupMapView(MapView mapView, final GeoPoint pos) { map = mapView; + map.getOverlays().add(new CopyrightOverlay(this)); map.setTileSource(TileSourceFactory.MAPNIK); map.getZoomController().setVisibility(CustomZoomButtonsController.Visibility.NEVER); map.setMultiTouchControls(true); diff --git a/src/main/java/eu/siacs/conversations/ui/ShareLocationActivity.java b/src/main/java/eu/siacs/conversations/ui/ShareLocationActivity.java index 01050ad0d..136e9d2b2 100644 --- a/src/main/java/eu/siacs/conversations/ui/ShareLocationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ShareLocationActivity.java @@ -11,9 +11,7 @@ import android.os.Bundle; import android.support.annotation.NonNull; import android.support.design.widget.Snackbar; import android.support.v7.widget.Toolbar; -import android.text.method.LinkMovementMethod; import android.view.View; -import android.widget.TextView; import org.osmdroid.api.IGeoPoint; import org.osmdroid.util.GeoPoint; @@ -107,8 +105,6 @@ public class ShareLocationActivity extends LocationActivity implements LocationL } toggleFixedLocation(); }); - - binding.openstreetmapCredit.setMovementMethod(LinkMovementMethod.getInstance()); } @Override diff --git a/src/main/res/layout/activity_share_location.xml b/src/main/res/layout/activity_share_location.xml index 9f25fa41f..01249da55 100644 --- a/src/main/res/layout/activity_share_location.xml +++ b/src/main/res/layout/activity_share_location.xml @@ -26,18 +26,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" /> - - #deffffff #b2ffffff #1fffffff - #80FFFFFF #fffafafa #ffeeeeee #ffe0e0e0 diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 82ed17fdd..03ecafea9 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -886,5 +886,4 @@ View %1$d Participant View %1$d Participants - © OpenStreetMap contributors