aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/res
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-14 03:02:41 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-14 03:02:41 -0600
commit81a0b6689e94b8a10ebf68dccbb94a1f11507487 (patch)
tree211a24d64df149a1bc1587b19f2d65dedba012b5 /androidApp/src/main/res
parent3692d0de20a85ef7e22a31aa9f842078fb774bbe (diff)
downloadetbsa-trackermap-mobile-81a0b6689e94b8a10ebf68dccbb94a1f11507487.tar.gz
etbsa-trackermap-mobile-81a0b6689e94b8a10ebf68dccbb94a1f11507487.tar.bz2
etbsa-trackermap-mobile-81a0b6689e94b8a10ebf68dccbb94a1f11507487.zip
Pass device name to details activity and redesigned commands fragment
Diffstat (limited to 'androidApp/src/main/res')
-rw-r--r--androidApp/src/main/res/layout/unit_details_commands.xml60
-rw-r--r--androidApp/src/main/res/values-es-rMX/strings.xml7
-rw-r--r--androidApp/src/main/res/values/strings.xml9
3 files changed, 58 insertions, 18 deletions
diff --git a/androidApp/src/main/res/layout/unit_details_commands.xml b/androidApp/src/main/res/layout/unit_details_commands.xml
index 6e1d7b2..6b554cc 100644
--- a/androidApp/src/main/res/layout/unit_details_commands.xml
+++ b/androidApp/src/main/res/layout/unit_details_commands.xml
@@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
@@ -12,29 +13,56 @@
app:cardCornerRadius="@dimen/card_border_radius"
app:cardElevation="@dimen/card_elevation"
app:cardUseCompatPadding="true"
- app:layout_constraintBottom_toTopOf="@id/sendCommandButton"
+ app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
- <ListView
- android:id="@+id/commandsList"
+ <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:choiceMode="singleChoice"
- android:listSelector="@color/darkBackground" />
+ android:orientation="vertical">
- </com.google.android.material.card.MaterialCardView>
+ <TextView
+ android:id="@+id/nameDetail"
+ style="@style/TextAppearance.AppCompat.Headline"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:textColor="@color/colorPrimaryDark"
+ android:layout_margin="@dimen/card_padding"
+ android:layout_marginBottom="@dimen/margin"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/commandsList"
+ tools:text="1AAUTO" />
- <com.google.android.material.button.MaterialButton
- android:id="@+id/sendCommandButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/margin"
- android:text="@string/send_command"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@id/commandsCard" />
+ <ListView
+ android:id="@+id/commandsList"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:choiceMode="singleChoice"
+ android:listSelector="@color/darkBackground"
+ app:layout_constraintTop_toBottomOf="@id/nameDetail"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/sendCommandButton" />
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/sendCommandButton"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/margin"
+ android:text="@string/send_command"
+ android:enabled="false"
+ app:layout_constraintTop_toBottomOf="@id/commandsList"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ />
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+ </com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/androidApp/src/main/res/values-es-rMX/strings.xml b/androidApp/src/main/res/values-es-rMX/strings.xml
index 0b4f4b3..1916f26 100644
--- a/androidApp/src/main/res/values-es-rMX/strings.xml
+++ b/androidApp/src/main/res/values-es-rMX/strings.xml
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="app_name">TrackerMap</string>
+ <!-- Shared strings -->
+ <string name="shared_ok">OK</string>
+ <string name="shared_cancel">Cancel</string>
<!-- LoginActivity -->
<string name="login_username">Nombre de usuario</string>
@@ -71,6 +73,9 @@
<!-- Commands -->
<string name="send_command">Enviar comando</string>
+ <string name="send_command_confirmation_text">
+ ¿Está seguro de que desea enviar el comando a la unidad %1$s?
+ </string>
<!-- Reports -->
<string name="positions">Posiciones</string>
diff --git a/androidApp/src/main/res/values/strings.xml b/androidApp/src/main/res/values/strings.xml
index 268f5d5..e3a31e0 100644
--- a/androidApp/src/main/res/values/strings.xml
+++ b/androidApp/src/main/res/values/strings.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="app_name">TrackerMap</string>
+ <string name="app_name" translatable="false">TrackerMap</string>
<!-- Non translatable -->
<string name="app_website_url" translatable="false">https://trackermap.mx/</string>
@@ -23,6 +23,10 @@
<string name="notification_channel_id" translatable="false">default</string>
<string name="notification_channel" translatable="false">Default</string>
+ <!-- Shared strings -->
+ <string name="shared_ok">OK</string>
+ <string name="shared_cancel">Cancel</string>
+
<!-- LoginActivity -->
<string name="login_username">Username</string>
<string name="login_password">Password</string>
@@ -92,6 +96,9 @@
<!-- Commands -->
<string name="send_command">Send Command</string>
+ <string name="send_command_confirmation_text">
+ Are you sure you want to send the command to device %1$s?
+ </string>
<!-- Reports -->
<string name="positions">Positions</string>