aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/res/layout
diff options
context:
space:
mode:
authorIsidro Henoch <imhenoch@protonmail.com>2022-01-03 13:55:58 -0600
committerIsidro Henoch <imhenoch@protonmail.com>2022-01-03 13:55:58 -0600
commit1c94fbca0faebea6d005a92a53e7885e3ddd7dc6 (patch)
tree5567d2c823e0d28627f67738d07b810a65a2a0eb /androidApp/src/main/res/layout
parent4196352a52eba7e9148cbab6e12d7bafb0f07d88 (diff)
parent84fd0a97d775b88ef03c3161bbe126032ace8238 (diff)
downloadetbsa-trackermap-mobile-1c94fbca0faebea6d005a92a53e7885e3ddd7dc6.tar.gz
etbsa-trackermap-mobile-1c94fbca0faebea6d005a92a53e7885e3ddd7dc6.tar.bz2
etbsa-trackermap-mobile-1c94fbca0faebea6d005a92a53e7885e3ddd7dc6.zip
Merge branch 'reports'
# Conflicts: # androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt # androidApp/src/main/res/values/strings.xml
Diffstat (limited to 'androidApp/src/main/res/layout')
-rw-r--r--androidApp/src/main/res/layout/details_activity.xml14
-rw-r--r--androidApp/src/main/res/layout/unit_details_commands.xml29
-rw-r--r--androidApp/src/main/res/layout/unit_details_reports.xml136
3 files changed, 154 insertions, 25 deletions
diff --git a/androidApp/src/main/res/layout/details_activity.xml b/androidApp/src/main/res/layout/details_activity.xml
index 00ebdbf..f79ea69 100644
--- a/androidApp/src/main/res/layout/details_activity.xml
+++ b/androidApp/src/main/res/layout/details_activity.xml
@@ -1,25 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto">
+ android:layout_height="match_parent">
<com.google.android.material.tabs.TabLayout
android:id="@+id/detailsTabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintEnd_toEndOf="parent"/>
+ app:layout_constraintTop_toTopOf="parent" />
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/detailsPager"
android:layout_width="match_parent"
android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/detailsTabs"
- app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintBottom_toBottomOf="parent"/>
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/detailsTabs" />
</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
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/layout/unit_details_reports.xml b/androidApp/src/main/res/layout/unit_details_reports.xml
index f1b52e3..cf3c7b2 100644
--- a/androidApp/src/main/res/layout/unit_details_reports.xml
+++ b/androidApp/src/main/res/layout/unit_details_reports.xml
@@ -1,19 +1,137 @@
<?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">
- <TextView
- android:id="@+id/unitReportsText"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- app:layout_constraintTop_toTopOf="parent"
+ <View
+ android:id="@+id/reportMap"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_margin="@dimen/margin"
+ android:background="@color/darkBackground"
+ android:visibility="gone"
+ app:layout_constraintBottom_toTopOf="@id/periodSection"
+ app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
+
+ <ScrollView
+ android:id="@+id/eventsScroll"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_margin="@dimen/margin"
+ android:visibility="gone"
+ app:layout_constraintBottom_toTopOf="@id/periodSection"
app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent">
+
+ <TableLayout
+ android:id="@+id/eventsTable"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:isScrollContainer="true"
+ android:scrollbars="vertical"
+ android:stretchColumns="*">
+
+ <TableRow android:background="@color/colorPrimary">
+
+ <TextView
+ android:paddingHorizontal="@dimen/padding"
+ android:text="@string/table_event"
+ android:textColor="@color/background" />
+
+ <TextView
+ android:paddingHorizontal="@dimen/padding"
+ android:text="@string/table_datetime"
+ android:textColor="@color/background" />
+
+ </TableRow>
+
+ </TableLayout>
+ </ScrollView>
+
+ <LinearLayout
+ android:id="@+id/periodSection"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/margin"
+ android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
- tools:text="REPORTS"/>
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+
+ <TextView
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:gravity="center_vertical"
+ android:text="@string/period"
+ android:textColor="@color/colorPrimaryDark"
+ android:textSize="22sp" />
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/periodButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/select_period"
+ android:textColor="@color/colorPrimaryDark"
+ app:backgroundTint="@color/darkBackground" />
+
+ </LinearLayout>
+
+ <com.addisonelliott.segmentedbutton.SegmentedButtonGroup
+ android:id="@+id/reportType"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/margin"
+ app:borderWidth="1dp"
+ app:dividerPadding="10dp"
+ app:dividerWidth="1dp"
+ app:position="0"
+ app:radius="30dp"
+ app:ripple="true"
+ app:selectedBackground="@color/colorPrimary">
+
+ <com.addisonelliott.segmentedbutton.SegmentedButton
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:padding="10dp"
+ app:drawableGravity="top"
+ app:selectedTextColor="@color/darkBackground"
+ app:text="@string/positions"
+ app:textColor="@color/colorPrimaryDark" />
+
+ <com.addisonelliott.segmentedbutton.SegmentedButton
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:padding="10dp"
+ app:drawableGravity="top"
+ app:selectedTextColor="@color/darkBackground"
+ app:text="@string/events"
+ app:textColor="@color/colorPrimaryDark" />
+
+ <com.addisonelliott.segmentedbutton.SegmentedButton
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:padding="10dp"
+ app:drawableGravity="top"
+ app:selectedTextColor="@color/darkBackground"
+ app:text="@string/stops"
+ app:textColor="@color/colorPrimaryDark" />
+
+ </com.addisonelliott.segmentedbutton.SegmentedButtonGroup>
+
+ </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file