aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/res
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-16 04:02:30 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-16 04:02:30 -0600
commit3f6958e68f6e4dd5d42e1049c05059502d939cf9 (patch)
treed451027198866bacc7a9404d11380276cb65e7e9 /androidApp/src/main/res
parentf8e7e755dc8e557e1e5b9e9be318f8415a2c7f8e (diff)
downloadetbsa-trackermap-mobile-3f6958e68f6e4dd5d42e1049c05059502d939cf9.tar.gz
etbsa-trackermap-mobile-3f6958e68f6e4dd5d42e1049c05059502d939cf9.tar.bz2
etbsa-trackermap-mobile-3f6958e68f6e4dd5d42e1049c05059502d939cf9.zip
Added attribution and refactored map layers code
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.xml7
-rw-r--r--androidApp/src/main/res/values/strings.xml3
7 files changed, 35 insertions, 9 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 809b64c..5e41768 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
index c0e83a5..bffceb9 100644
--- a/androidApp/src/main/res/values/map_layers.xml
+++ b/androidApp/src/main/res/values/map_layers.xml
@@ -1,19 +1,22 @@
<?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_url" translatable="false">
+ <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_url" translatable="false">
+ <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>
diff --git a/androidApp/src/main/res/values/strings.xml b/androidApp/src/main/res/values/strings.xml
index a3d2f28..11c914f 100644
--- a/androidApp/src/main/res/values/strings.xml
+++ b/androidApp/src/main/res/values/strings.xml
@@ -32,9 +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="menu_account">Account</string>
<string name="menu_about">About</string>
<string name="menu_logout">Logout</string>