aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/res
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-16 04:16:53 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-16 04:16:53 -0600
commit4a796e47bede0cbe5512868001c22b6889e9f72e (patch)
tree48aa1dfed3dcae88f0453c1c9c4788d04173f9e0 /androidApp/src/main/res
parent51d42034f00cc640ff94c06333e2354c8e440a3f (diff)
parenta2ba612c515a53cb6e7f283858a518d60188651b (diff)
downloadetbsa-trackermap-mobile-4a796e47bede0cbe5512868001c22b6889e9f72e.tar.gz
etbsa-trackermap-mobile-4a796e47bede0cbe5512868001c22b6889e9f72e.tar.bz2
etbsa-trackermap-mobile-4a796e47bede0cbe5512868001c22b6889e9f72e.zip
Merge branch 'main' of https://git.sr.ht/~avalos/trackermap-mobile
Diffstat (limited to 'androidApp/src/main/res')
-rw-r--r--androidApp/src/main/res/layout/unit_map_fragment.xml23
-rw-r--r--androidApp/src/main/res/values-es-rMX/map_layers.xml5
-rw-r--r--androidApp/src/main/res/values-es-rMX/strings.xml3
-rw-r--r--androidApp/src/main/res/values/colors.xml2
-rw-r--r--androidApp/src/main/res/values/dimen.xml1
-rw-r--r--androidApp/src/main/res/values/map_layers.xml26
-rw-r--r--androidApp/src/main/res/values/strings.xml11
7 files changed, 56 insertions, 15 deletions
diff --git a/androidApp/src/main/res/layout/unit_map_fragment.xml b/androidApp/src/main/res/layout/unit_map_fragment.xml
index 486f1ce..8395013 100644
--- a/androidApp/src/main/res/layout/unit_map_fragment.xml
+++ b/androidApp/src/main/res/layout/unit_map_fragment.xml
@@ -14,7 +14,8 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
- android:name="mx.trackermap.TrackerMap.android.map.MapFragment"/>
+ android:name="mx.trackermap.TrackerMap.android.map.MapFragment"
+ tools:visibility="invisible"/>
<androidx.cardview.widget.CardView
android:id="@+id/mapUnitCard"
@@ -121,4 +122,24 @@
</androidx.cardview.widget.CardView>
+ <!-- Attribution -->
+ <FrameLayout
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:background="@color/colorAttributionBackground"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent">
+
+ <TextView
+ android:id="@+id/attributionText"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ tools:text="Copyright (C) OpenStreetMap"
+ android:textSize="@dimen/attribution_text_size"
+ android:textColor="@color/colorAttributionText"
+ android:layout_margin="6dp" />
+
+ </FrameLayout>
+
</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/androidApp/src/main/res/values-es-rMX/map_layers.xml b/androidApp/src/main/res/values-es-rMX/map_layers.xml
new file mode 100644
index 0000000..eff37d9
--- /dev/null
+++ b/androidApp/src/main/res/values-es-rMX/map_layers.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="layer_streets">Calles</string>
+ <string name="layer_satellite">Satélite</string>
+</resources> \ No newline at end of file
diff --git a/androidApp/src/main/res/values-es-rMX/strings.xml b/androidApp/src/main/res/values-es-rMX/strings.xml
index 47e4716..0806870 100644
--- a/androidApp/src/main/res/values-es-rMX/strings.xml
+++ b/androidApp/src/main/res/values-es-rMX/strings.xml
@@ -19,9 +19,6 @@
<string name="switch_layer">Cambiar capa del mapa</string>
<string name="open_profile">Ver información de cuenta</string>
- <string name="layer_streets">Calles</string>
- <string name="layer_satellite">Satélite</string>
-
<string name="menu_account">Cuenta</string>
<string name="menu_about">Acerca de</string>
<string name="menu_logout">Cerrar sesión</string>
diff --git a/androidApp/src/main/res/values/colors.xml b/androidApp/src/main/res/values/colors.xml
index bb4ab14..23fe6fb 100644
--- a/androidApp/src/main/res/values/colors.xml
+++ b/androidApp/src/main/res/values/colors.xml
@@ -12,6 +12,8 @@
<color name="colorGeofenceLabel">#1976D2</color>
<color name="colorGeofenceLabelOutline">#FFFFFF</color>
<color name="colorReport">#388E3C</color>
+ <color name="colorAttributionText">#66000000</color>
+ <color name="colorAttributionBackground">#4DFFFFFF</color>
<color name="colorOnline">#388E3C</color>
<color name="colorOffline">#D32F2F</color>
diff --git a/androidApp/src/main/res/values/dimen.xml b/androidApp/src/main/res/values/dimen.xml
index 271a12b..92d5242 100644
--- a/androidApp/src/main/res/values/dimen.xml
+++ b/androidApp/src/main/res/values/dimen.xml
@@ -33,6 +33,7 @@
<dimen name="geofence_label_text_size">11sp</dimen>
<dimen name="geofence_label_width">4dp</dimen>
<dimen name="report_label_width">10dp</dimen>
+ <dimen name="attribution_text_size">11sp</dimen>
<!-- User Information -->
<dimen name="fields_spacing">8dp</dimen>
diff --git a/androidApp/src/main/res/values/map_layers.xml b/androidApp/src/main/res/values/map_layers.xml
new file mode 100644
index 0000000..bffceb9
--- /dev/null
+++ b/androidApp/src/main/res/values/map_layers.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="layer_streets">Streets</string>
+ <string name="layer_satellite">Satellite</string>
+
+ <!-- Tile URLs -->
+ <!-- [0] = tile server URL -->
+ <!-- [1] = min zoom -->
+ <!-- [2] = max zoom -->
+ <!-- [3] = attribution text -->
+
+ <string-array name="maps_streets_tile" translatable="false">
+ <item>https://a.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png</item>
+ <item>0</item>
+ <item>21</item>
+ <item>&#169; OpenStreetMap France | &#169; &lt;a href="https://www.openstreetmap.org/copyright"&gt;OpenStreetMap&lt;/a&gt; contributors</item>
+ </string-array>
+
+ <string-array name="maps_satellite_tile" translatable="false">
+ <item>https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}</item>
+ <item>0</item>
+ <item>20</item>
+ <item>Tiles &#169; Esri &#8212; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community</item>
+ </string-array>
+
+</resources> \ No newline at end of file
diff --git a/androidApp/src/main/res/values/strings.xml b/androidApp/src/main/res/values/strings.xml
index 1caf502..1cc1f10 100644
--- a/androidApp/src/main/res/values/strings.xml
+++ b/androidApp/src/main/res/values/strings.xml
@@ -10,13 +10,6 @@
https://www.google.com/maps/place/%1$f,%2$f?z=19
</string>
- <string name="maps_streets_tile_url" translatable="false">
- https://mt0.google.com/vt/lyrs=m&amp;hl=en&amp;x={x}&amp;y={y}&amp;z={z}&amp;s=Ga
- </string>
- <string name="maps_satellite_url" translatable="false">
- https://mt0.google.com/vt/lyrs=y&amp;hl=en&amp;x={x}&amp;y={y}&amp;z={z}&amp;s=Ga
- </string>
-
<string name="notification_channel_id" translatable="false">default</string>
<string name="notification_channel" translatable="false">Default</string>
@@ -39,10 +32,6 @@
<string name="switch_layer">Switch map layer</string>
<string name="open_profile">View account info</string>
- <string name="layer_streets">Streets</string>
- <string name="layer_satellite">Satellite</string>
- <string name="layer_hybrid">Hybrid</string>
-
<string name="menu_account">Account</string>
<string name="menu_about">About</string>
<string name="menu_logout">Logout</string>