aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/res
diff options
context:
space:
mode:
authorIsidro Henoch <imhenoch@protonmail.com>2021-12-21 14:21:16 -0600
committerIsidro Henoch <imhenoch@protonmail.com>2021-12-21 14:21:16 -0600
commit7c8a65b8d1ae8a049bf67260acb6fafbd95adac9 (patch)
tree8e536d19e63df3fe53f921858a710746b5df0e2a /androidApp/src/main/res
parent090bcc911e569040ceeaef29f7ca8db82694d9b0 (diff)
downloadetbsa-trackermap-mobile-7c8a65b8d1ae8a049bf67260acb6fafbd95adac9.tar.gz
etbsa-trackermap-mobile-7c8a65b8d1ae8a049bf67260acb6fafbd95adac9.tar.bz2
etbsa-trackermap-mobile-7c8a65b8d1ae8a049bf67260acb6fafbd95adac9.zip
Implements the commands list
- Shows command details - Sends a selected command to a device
Diffstat (limited to 'androidApp/src/main/res')
-rw-r--r--androidApp/src/main/res/layout/unit_details_commands.xml29
-rw-r--r--androidApp/src/main/res/values/dimen.xml1
-rw-r--r--androidApp/src/main/res/values/strings.xml1
3 files changed, 22 insertions, 9 deletions
diff --git a/androidApp/src/main/res/layout/unit_details_commands.xml b/androidApp/src/main/res/layout/unit_details_commands.xml
index dfd6516..e98b113 100644
--- a/androidApp/src/main/res/layout/unit_details_commands.xml
+++ b/androidApp/src/main/res/layout/unit_details_commands.xml
@@ -1,19 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
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">
+
+ <ListView
+ android:id="@+id/commandsList"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:choiceMode="singleChoice"
+ android:listSelector="@color/darkBackground"
+ app:layout_constraintBottom_toTopOf="@id/sendCommandButton"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
- <TextView
- android:id="@+id/unitCommandsText"
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/sendCommandButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
+ android:layout_marginBottom="@dimen/margin"
+ android:text="@string/send_command"
app:layout_constraintBottom_toBottomOf="parent"
- tools:text="COMMANDS"/>
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/commandsList" />
</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/androidApp/src/main/res/values/dimen.xml b/androidApp/src/main/res/values/dimen.xml
index 6ce7887..18fd0eb 100644
--- a/androidApp/src/main/res/values/dimen.xml
+++ b/androidApp/src/main/res/values/dimen.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="padding">8dp</dimen>
+ <dimen name="margin">16dp</dimen>
<!-- CardView -->
<dimen name="card_border_radius">20dp</dimen>
diff --git a/androidApp/src/main/res/values/strings.xml b/androidApp/src/main/res/values/strings.xml
index 5692688..7478ddb 100644
--- a/androidApp/src/main/res/values/strings.xml
+++ b/androidApp/src/main/res/values/strings.xml
@@ -25,4 +25,5 @@
<string name="units_search">Type to search</string>
<string name="key">Key</string>
<string name="value">Value</string>
+ <string name="send_command">Send Command</string>
</resources> \ No newline at end of file