diff options
author | Iván Ávalos <avalos@disroot.org> | 2023-01-03 20:27:59 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2023-01-03 20:27:59 -0600 |
commit | 8655084132c95e0756645726a38f035a549ae2a4 (patch) | |
tree | 3337e94e34bf9fc6b11fd1d4905b0cecc703be0b /androidApp/src/main | |
parent | 8f9645c695c975d8cdfcdab551506545b6247d19 (diff) | |
download | etbsa-trackermap-mobile-8655084132c95e0756645726a38f035a549ae2a4.tar.gz etbsa-trackermap-mobile-8655084132c95e0756645726a38f035a549ae2a4.tar.bz2 etbsa-trackermap-mobile-8655084132c95e0756645726a38f035a549ae2a4.zip |
[android] Rebranding and bump to 1.3.4
Diffstat (limited to 'androidApp/src/main')
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> |