aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-13 22:34:01 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-13 22:34:01 -0600
commit07cbed18c86307c96fe5e40ff04827f3747d6018 (patch)
tree2a17b57c04be60b1dc8eb17afabd2e47f287ab26 /androidApp/src
parentcfd54183ba1401deece64cb92e352076a743dfae (diff)
downloadetbsa-trackermap-mobile-07cbed18c86307c96fe5e40ff04827f3747d6018.tar.gz
etbsa-trackermap-mobile-07cbed18c86307c96fe5e40ff04827f3747d6018.tar.bz2
etbsa-trackermap-mobile-07cbed18c86307c96fe5e40ff04827f3747d6018.zip
Load report and geofence line width from dimen.xml
Diffstat (limited to 'androidApp/src')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt6
-rw-r--r--androidApp/src/main/res/values/dimen.xml2
2 files changed, 6 insertions, 2 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt
index a45b864..60c8a47 100644
--- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt
+++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt
@@ -140,10 +140,11 @@ class MapFragment : GlobeMapFragment() {
val colorReport = ContextCompat.getColor(context!!, R.color.colorReport)
val colorLabel = ContextCompat.getColor(context!!, R.color.colorMarkerLabel)
val colorLabelOutline = ContextCompat.getColor(context!!, R.color.colorMarkerLabelOutline)
+ val vectorWidth = context?.resources?.getDimensionPixelSize(R.dimen.report_label_width)?.toFloat()
val vectorInfo = VectorInfo()
vectorInfo.setColor(colorReport)
- vectorInfo.setLineWidth(20.0f)
+ vectorInfo.setLineWidth(vectorWidth ?: 20f)
val labelInfo = LabelInfo()
labelInfo.typeface = Typeface.DEFAULT_BOLD
@@ -242,10 +243,11 @@ class MapFragment : GlobeMapFragment() {
val colorFill = ContextCompat.getColor(context!!, R.color.colorGeofence)
val colorLabel = ContextCompat.getColor(context!!, R.color.colorGeofenceLabel)
val colorLabelOutline = ContextCompat.getColor(context!!, R.color.colorMarkerLabelOutline)
+ val vectorWidth = context?.resources?.getDimensionPixelSize(R.dimen.geofence_label_width)?.toFloat()
val vectorInfo = VectorInfo()
vectorInfo.setColor(colorFill)
- vectorInfo.setLineWidth(10.0f)
+ vectorInfo.setLineWidth(vectorWidth ?: 4f)
val labelInfo = LabelInfo()
labelInfo.typeface = Typeface.DEFAULT_BOLD
diff --git a/androidApp/src/main/res/values/dimen.xml b/androidApp/src/main/res/values/dimen.xml
index 5b17b3e..788bf45 100644
--- a/androidApp/src/main/res/values/dimen.xml
+++ b/androidApp/src/main/res/values/dimen.xml
@@ -28,6 +28,8 @@
<!-- Map -->
<dimen name="marker_label_text_size">11sp</dimen>
<dimen name="geofence_label_text_size">11sp</dimen>
+ <dimen name="geofence_label_width">4dp</dimen>
+ <dimen name="report_label_width">10dp</dimen>
<!-- User Information -->
<dimen name="fields_spacing">8dp</dimen>