From e4f46831685da5eeb927e2fa3c21dcd0374875c9 Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Thu, 13 Jan 2022 03:09:40 -0600 Subject: Replaced screen labels background with outline --- .../mx/trackermap/TrackerMap/android/map/MapFragment.kt | 17 ++++++++++------- androidApp/src/main/res/values/colors.xml | 5 +++-- 2 files changed, 13 insertions(+), 9 deletions(-) (limited to 'androidApp') 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 @@ #FDFDFD #ECEFF3 - #656A74 - #FFFFFF + #43474E + #FFFFFF #1976D2 #1976D2 + #FFFFFF #388E3C #388E3C -- cgit v1.2.3