aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'androidApp/src/main')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/shared/UnitRenderData.kt29
-rw-r--r--androidApp/src/main/res/layout/unit_item.xml3
-rw-r--r--androidApp/src/main/res/layout/unit_map_fragment.xml3
-rw-r--r--androidApp/src/main/res/values-es-rMX/strings.xml1
-rw-r--r--androidApp/src/main/res/values/strings.xml1
5 files changed, 15 insertions, 22 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/shared/UnitRenderData.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/shared/UnitRenderData.kt
index 340371a..6e96552 100644
--- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/shared/UnitRenderData.kt
+++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/shared/UnitRenderData.kt
@@ -90,27 +90,16 @@ class UnitRenderData {
}
/* Status icon */
- when (unit.getStatus()) {
- UnitInformation.Status.ONLINE -> {
- statusIcon.setColorFilter(
- ContextCompat.getColor(context, R.color.colorOnline)
- )
- }
- UnitInformation.Status.OFFLINE -> {
- statusIcon.setColorFilter(
- ContextCompat.getColor(context, R.color.colorOffline)
- )
- }
- else -> {
- statusIcon.setColorFilter(Color.GRAY)
- }
- }
-
- /* Ignition icon */
- ignitionIcon.visibility = if (unit.getIgnition()) {
- View.VISIBLE
+ if (unit.getIgnition()) {
+ statusIcon.setColorFilter(
+ ContextCompat.getColor(context, R.color.colorOnline)
+ )
+ statusIcon.contentDescription = context.getString(R.string.unit_ignition_on)
} else {
- View.GONE
+ statusIcon.setColorFilter(
+ ContextCompat.getColor(context, R.color.colorOffline)
+ )
+ statusIcon.contentDescription = context.getString(R.string.unit_ignition_off)
}
/* Engine stop */
diff --git a/androidApp/src/main/res/layout/unit_item.xml b/androidApp/src/main/res/layout/unit_item.xml
index 03bef15..d0f827b 100644
--- a/androidApp/src/main/res/layout/unit_item.xml
+++ b/androidApp/src/main/res/layout/unit_item.xml
@@ -118,7 +118,8 @@
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:src="@drawable/device_ignition"
- android:contentDescription="@string/unit_ignition_on" />
+ android:contentDescription="@string/unit_ignition_on"
+ android:visibility="gone" />
<ImageView
android:id="@+id/engineStopIcon"
diff --git a/androidApp/src/main/res/layout/unit_map_fragment.xml b/androidApp/src/main/res/layout/unit_map_fragment.xml
index b33b946..34698f7 100644
--- a/androidApp/src/main/res/layout/unit_map_fragment.xml
+++ b/androidApp/src/main/res/layout/unit_map_fragment.xml
@@ -64,7 +64,8 @@
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:src="@drawable/device_ignition"
- tools:ignore="ContentDescription" />
+ tools:ignore="ContentDescription"
+ android:visibility="gone" />
<ImageView
android:id="@+id/engineStopIcon"
diff --git a/androidApp/src/main/res/values-es-rMX/strings.xml b/androidApp/src/main/res/values-es-rMX/strings.xml
index 5612e77..53e74a2 100644
--- a/androidApp/src/main/res/values-es-rMX/strings.xml
+++ b/androidApp/src/main/res/values-es-rMX/strings.xml
@@ -34,6 +34,7 @@
<string name="unit_status_on">Estatus encendido</string>
<string name="unit_status_off">Estatus apagado</string>
<string name="unit_ignition_on">Ignición encendida</string>
+ <string name="unit_ignition_off">Ignición apagada</string>
<string name="unit_lock_on">Paro de motor encendido</string>
<string name="unit_lock_off">Paro de motor apagado</string>
<string name="unit_driver_name">Nombre del conductor</string>
diff --git a/androidApp/src/main/res/values/strings.xml b/androidApp/src/main/res/values/strings.xml
index a946cf8..3177ad6 100644
--- a/androidApp/src/main/res/values/strings.xml
+++ b/androidApp/src/main/res/values/strings.xml
@@ -48,6 +48,7 @@
<string name="unit_status_on">Status on</string>
<string name="unit_status_off">Status off</string>
<string name="unit_ignition_on">Ignition on</string>
+ <string name="unit_ignition_off">Ignition off</string>
<string name="unit_lock_on">Engine stop on</string>
<string name="unit_lock_off">Engine stop off</string>
<string name="unit_driver_name">Driver name</string>