aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-13 03:09:40 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-13 03:09:40 -0600
commit9b9e26017e5fa1a429ed0ef1b249ce80a45909d4 (patch)
tree604954f84c06042d8da158512fbc9e5865546c27
parent1d7d16172c87c54a71c0c7fe6e46bfd18635adf1 (diff)
downloadetbsa-trackermap-mobile-9b9e26017e5fa1a429ed0ef1b249ce80a45909d4.tar.gz
etbsa-trackermap-mobile-9b9e26017e5fa1a429ed0ef1b249ce80a45909d4.tar.bz2
etbsa-trackermap-mobile-9b9e26017e5fa1a429ed0ef1b249ce80a45909d4.zip
Replaced screen labels background with outline
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt17
-rw-r--r--androidApp/src/main/res/values/colors.xml5
2 files changed, 13 insertions, 9 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 b8fbc57..ef1e27f 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
@@ -1,7 +1,6 @@
package mx.trackermap.TrackerMap.android.map
import android.graphics.Bitmap
-import android.graphics.Color
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
@@ -131,17 +130,18 @@ class MapFragment : GlobeMapFragment() {
}.toTypedArray()
val fontSize = context?.resources?.getDimensionPixelSize(R.dimen.marker_label_text_size)
- val reportColor = ContextCompat.getColor(context!!, R.color.colorReport)
- val labelColor = ContextCompat.getColor(context!!, R.color.colorMarkerLabel)
- val labelBgColor = ContextCompat.getColor(context!!, R.color.bgColorMarkerLabel)
+ 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 vectorInfo = VectorInfo()
- vectorInfo.setColor(reportColor)
+ vectorInfo.setColor(colorReport)
vectorInfo.setLineWidth(20.0f)
val labelInfo = LabelInfo()
- labelInfo.textColor = labelColor
- labelInfo.backgroundColor = labelBgColor
+ labelInfo.textColor = colorLabel
+ labelInfo.outlineColor = colorLabelOutline
+ labelInfo.outlineSize = 3.0f
fontSize?.let {
labelInfo.fontSize = it.toFloat()
}
@@ -233,6 +233,7 @@ class MapFragment : GlobeMapFragment() {
val fontSize = context?.resources?.getDimensionPixelSize(R.dimen.marker_label_text_size)
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 vectorInfo = VectorInfo()
vectorInfo.setColor(colorFill)
@@ -240,6 +241,8 @@ class MapFragment : GlobeMapFragment() {
val labelInfo = LabelInfo()
labelInfo.textColor = colorLabel
+ labelInfo.outlineColor = colorLabelOutline
+ labelInfo.outlineSize = 3.0f
fontSize?.let {
labelInfo.fontSize = it.toFloat()
}
diff --git a/androidApp/src/main/res/values/colors.xml b/androidApp/src/main/res/values/colors.xml
index b241148..bb4ab14 100644
--- a/androidApp/src/main/res/values/colors.xml
+++ b/androidApp/src/main/res/values/colors.xml
@@ -6,10 +6,11 @@
<color name="background">#FDFDFD</color>
<color name="darkBackground">#ECEFF3</color>
- <color name="colorMarkerLabel">#656A74</color>
- <color name="bgColorMarkerLabel">#FFFFFF</color>
+ <color name="colorMarkerLabel">#43474E</color>
+ <color name="colorMarkerLabelOutline">#FFFFFF</color>
<color name="colorGeofence">#1976D2</color>
<color name="colorGeofenceLabel">#1976D2</color>
+ <color name="colorGeofenceLabelOutline">#FFFFFF</color>
<color name="colorReport">#388E3C</color>
<color name="colorOnline">#388E3C</color>