From a822ae0996b13576be9dc7a9fc3b9c5acb0d90d3 Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Sun, 16 Jan 2022 19:19:03 -0600 Subject: Hide device limit when <= 0, and show device unique ID on details view --- .../TrackerMap/android/details/information/UnitInformationFragment.kt | 3 +++ androidApp/src/main/res/values-es-rMX/strings.xml | 1 + androidApp/src/main/res/values/strings.xml | 1 + 3 files changed, 5 insertions(+) (limited to 'androidApp') diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/information/UnitInformationFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/information/UnitInformationFragment.kt index 568bd6b..e75f475 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/information/UnitInformationFragment.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/information/UnitInformationFragment.kt @@ -96,6 +96,9 @@ class UnitInformationFragment : Fragment() { unit.device.contact?.let { contact -> details.add(getString(R.string.unit_info_contact) to contact) } + unit.device.uniqueId?.let { uniqueId -> + details.add(getString(R.string.unit_info_uniqueid) to uniqueId) + } unit.position?.fixTime?.let { fixTime -> details.add(getString(R.string.unit_info_datetime) to Formatter.formatDate(fixTime)) } diff --git a/androidApp/src/main/res/values-es-rMX/strings.xml b/androidApp/src/main/res/values-es-rMX/strings.xml index 835f342..6b2bd11 100644 --- a/androidApp/src/main/res/values-es-rMX/strings.xml +++ b/androidApp/src/main/res/values-es-rMX/strings.xml @@ -66,6 +66,7 @@ Contacto + ID único Velocidad Dirección Latitud diff --git a/androidApp/src/main/res/values/strings.xml b/androidApp/src/main/res/values/strings.xml index 62963fa..31c0ed4 100644 --- a/androidApp/src/main/res/values/strings.xml +++ b/androidApp/src/main/res/values/strings.xml @@ -79,6 +79,7 @@ Contact + Unique ID Speed Address Latitude -- cgit v1.2.3 From 33e051ae011471e3472a69d405f805319d25bd70 Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Sun, 16 Jan 2022 19:19:08 -0600 Subject: Hide device limit when <= 0, and show device unique ID on details view --- .../TrackerMap/android/session/UserInformationActivity.kt | 6 ++++++ androidApp/src/main/res/layout/user_information_activity.xml | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'androidApp') diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationActivity.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationActivity.kt index 13deed0..a3c6fd6 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationActivity.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationActivity.kt @@ -64,6 +64,12 @@ class UserInformationActivity : AppCompatActivity() { idInfo.text = "${user.id ?: "--"}" deviceLimitInfo.text = "${user.deviceLimit ?: "--"}" adminInfo.text = "${user.administrator}" + user.deviceLimit?.let { + if (it <= 0) { + adminInfoLabel.visibility = View.GONE + adminInfo.visibility = View.GONE + } + } } } } diff --git a/androidApp/src/main/res/layout/user_information_activity.xml b/androidApp/src/main/res/layout/user_information_activity.xml index bc81b20..252505f 100644 --- a/androidApp/src/main/res/layout/user_information_activity.xml +++ b/androidApp/src/main/res/layout/user_information_activity.xml @@ -60,6 +60,7 @@ android:textAppearance="@style/TextAppearance.AppCompat.Headline"/> + android:visibility="invisible"/> -- cgit v1.2.3