aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/res
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-15 20:08:37 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-15 20:08:37 -0600
commit2980a4496edf94259e1244e18c000f477aa3db43 (patch)
tree2bfcaff8312058e4c16cc238ded881f59727983e /androidApp/src/main/res
parent1f3a6112793c6097fa0863887b5b8b9e984b87a0 (diff)
downloadetbsa-trackermap-mobile-2980a4496edf94259e1244e18c000f477aa3db43.tar.gz
etbsa-trackermap-mobile-2980a4496edf94259e1244e18c000f477aa3db43.tar.bz2
etbsa-trackermap-mobile-2980a4496edf94259e1244e18c000f477aa3db43.zip
Improved loading indicators, improved layout semantics, added translations and changed default view to MAP
Diffstat (limited to 'androidApp/src/main/res')
-rw-r--r--androidApp/src/main/res/drawable/icon_search.xml10
-rw-r--r--androidApp/src/main/res/layout/devices_fragment.xml16
-rw-r--r--androidApp/src/main/res/layout/loading_indicator.xml12
-rw-r--r--androidApp/src/main/res/layout/login.xml142
-rw-r--r--androidApp/src/main/res/layout/login_activity.xml33
-rw-r--r--androidApp/src/main/res/layout/unit_details_commands.xml130
-rw-r--r--androidApp/src/main/res/layout/unit_details_information.xml84
-rw-r--r--androidApp/src/main/res/layout/unit_details_reports.xml15
-rw-r--r--androidApp/src/main/res/layout/unit_item.xml30
-rw-r--r--androidApp/src/main/res/layout/units_activity.xml28
-rw-r--r--androidApp/src/main/res/layout/user_information_activity.xml342
-rw-r--r--androidApp/src/main/res/values-es-rMX/strings.xml6
-rw-r--r--androidApp/src/main/res/values/dimen.xml7
-rw-r--r--androidApp/src/main/res/values/strings.xml6
14 files changed, 474 insertions, 387 deletions
diff --git a/androidApp/src/main/res/drawable/icon_search.xml b/androidApp/src/main/res/drawable/icon_search.xml
new file mode 100644
index 0000000..07b76d6
--- /dev/null
+++ b/androidApp/src/main/res/drawable/icon_search.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/>
+</vector>
diff --git a/androidApp/src/main/res/layout/devices_fragment.xml b/androidApp/src/main/res/layout/devices_fragment.xml
index fd91db3..1dd1690 100644
--- a/androidApp/src/main/res/layout/devices_fragment.xml
+++ b/androidApp/src/main/res/layout/devices_fragment.xml
@@ -1,17 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout
+<FrameLayout
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">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/devicesList"
android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+ <include
+ android:id="@+id/infoLoading"
+ android:layout_width="match_parent"
android:layout_height="match_parent"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ layout="@layout/loading_indicator"
+ android:visibility="gone"/>
-</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
+</FrameLayout> \ No newline at end of file
diff --git a/androidApp/src/main/res/layout/loading_indicator.xml b/androidApp/src/main/res/layout/loading_indicator.xml
new file mode 100644
index 0000000..83b94d5
--- /dev/null
+++ b/androidApp/src/main/res/layout/loading_indicator.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@color/background">
+
+ <ProgressBar
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"/>
+
+</FrameLayout> \ No newline at end of file
diff --git a/androidApp/src/main/res/layout/login.xml b/androidApp/src/main/res/layout/login.xml
index 2512052..35c9410 100644
--- a/androidApp/src/main/res/layout/login.xml
+++ b/androidApp/src/main/res/layout/login.xml
@@ -1,74 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.cardview.widget.CardView
+<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:name="mx.trackermap.TrackerMap.android.session.LoginFragment"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:cardCornerRadius="@dimen/card_border_radius"
- app:cardElevation="@dimen/card_elevation"
- app:cardUseCompatPadding="true">
+ android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingVertical="@dimen/card_large_padding"
- android:paddingHorizontal="@dimen/card_padding">
-
- <com.google.android.material.textfield.TextInputLayout
- android:id="@+id/usernameInputLayout"
- style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="@string/login_username"
- app:layout_constraintBottom_toTopOf="@+id/passwordInputLayout"
+ android:layout_height="match_parent">
+
+ <androidx.appcompat.widget.AppCompatImageView
+ android:id="@+id/bannerImage"
+ android:layout_width="0dp"
+ android:layout_height="@dimen/about_logo_height"
+ app:layout_constraintWidth_percent="0.5"
+ app:layout_constraintDimensionRatio="1"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_bias="0.5"
+ android:layout_marginHorizontal="@dimen/card_margin"
+ app:srcCompat="@drawable/about_logo" />
+
+ <androidx.cardview.widget.CardView
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ app:cardCornerRadius="@dimen/card_border_radius"
+ app:cardElevation="@dimen/card_elevation"
+ app:cardUseCompatPadding="true"
+ app:layout_constraintTop_toBottomOf="@id/bannerImage"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent">
+ app:layout_constraintEnd_toEndOf="parent"
+ android:layout_marginHorizontal="@dimen/card_margin"
+ android:layout_marginBottom="16dp">
- <com.google.android.material.textfield.TextInputEditText
- android:id="@+id/usernameEditText"
+ <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:inputType="textEmailAddress"/>
+ android:paddingVertical="@dimen/card_large_padding"
+ android:paddingHorizontal="@dimen/card_padding">
- </com.google.android.material.textfield.TextInputLayout>
+ <com.google.android.material.textfield.TextInputLayout
+ android:id="@+id/usernameInputLayout"
+ style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/login_username"
+ app:layout_constraintBottom_toTopOf="@+id/passwordInputLayout"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.5"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent">
- <com.google.android.material.textfield.TextInputLayout
- android:id="@+id/passwordInputLayout"
- style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="@string/login_password"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_bias="0.5"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/usernameInputLayout"
- app:layout_constraintBottom_toTopOf="@id/signinButton"
- android:layout_marginTop="24dp">
+ <com.google.android.material.textfield.TextInputEditText
+ android:id="@+id/usernameEditText"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:inputType="textEmailAddress"/>
- <com.google.android.material.textfield.TextInputEditText
- android:id="@+id/passwordEditText"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:inputType="textPassword"/>
+ </com.google.android.material.textfield.TextInputLayout>
- </com.google.android.material.textfield.TextInputLayout>
+ <com.google.android.material.textfield.TextInputLayout
+ android:id="@+id/passwordInputLayout"
+ style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/login_password"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.5"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/usernameInputLayout"
+ app:layout_constraintBottom_toTopOf="@id/signinButton"
+ android:layout_marginTop="24dp">
- <com.google.android.material.button.MaterialButton
- android:id="@+id/signinButton"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- app:layout_constraintWidth_percent="0.5"
- app:layout_constraintTop_toBottomOf="@id/passwordInputLayout"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintHorizontal_bias="0.5"
- android:layout_marginTop="40dp"
- android:text="@string/login_login"/>
+ <com.google.android.material.textfield.TextInputEditText
+ android:id="@+id/passwordEditText"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:inputType="textPassword"/>
+
+ </com.google.android.material.textfield.TextInputLayout>
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/signinButton"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ app:layout_constraintWidth_percent="0.5"
+ app:layout_constraintTop_toBottomOf="@id/passwordInputLayout"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintHorizontal_bias="0.5"
+ android:layout_marginTop="40dp"
+ android:text="@string/login_login"/>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+ </androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>
-</androidx.cardview.widget.CardView> \ No newline at end of file
+ <include
+ android:id="@+id/infoLoading"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ layout="@layout/loading_indicator"
+ android:visibility="gone"/>
+
+</FrameLayout> \ No newline at end of file
diff --git a/androidApp/src/main/res/layout/login_activity.xml b/androidApp/src/main/res/layout/login_activity.xml
index be143d9..1c75a7b 100644
--- a/androidApp/src/main/res/layout/login_activity.xml
+++ b/androidApp/src/main/res/layout/login_activity.xml
@@ -1,30 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout
+<androidx.fragment.app.FragmentContainerView
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/loginFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto">
-
- <androidx.appcompat.widget.AppCompatImageView
- android:id="@+id/bannerImage"
- android:layout_width="0dp"
- android:layout_height="0dp"
- app:layout_constraintWidth_percent="0.5"
- app:layout_constraintDimensionRatio="1"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:srcCompat="@drawable/ic_launcher_foreground" />
-
- <androidx.fragment.app.FragmentContainerView
- android:id="@+id/loginFragment"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:name="mx.trackermap.TrackerMap.android.session.LoginFragment"
- app:layout_constraintTop_toBottomOf="@id/bannerImage"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- android:layout_marginHorizontal="@dimen/card_margin"
- android:layout_marginBottom="16dp"/>
-
-</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
+ android:name="mx.trackermap.TrackerMap.android.session.LoginFragment"
+ app:layout_constraintTop_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent" /> \ 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 3616f75..01aefb8 100644
--- a/androidApp/src/main/res/layout/unit_details_commands.xml
+++ b/androidApp/src/main/res/layout/unit_details_commands.xml
@@ -1,79 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout
+<FrameLayout
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">
- <ProgressBar
- android:id="@+id/reportLoading"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/margin"
- android:translationZ="9dp"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
- <com.google.android.material.card.MaterialCardView
- android:id="@+id/commandsCard"
- android:layout_width="0dp"
- android:layout_height="0dp"
- app:cardCornerRadius="@dimen/card_border_radius"
- app:cardElevation="@dimen/card_elevation"
- app:cardUseCompatPadding="true"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent">
+ <com.google.android.material.card.MaterialCardView
+ android:id="@+id/commandsCard"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:cardCornerRadius="@dimen/card_border_radius"
+ app:cardElevation="@dimen/card_elevation"
+ app:cardUseCompatPadding="true">
- <androidx.constraintlayout.widget.ConstraintLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
- <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" />
+ <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" />
- <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" />
+ <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"
- />
+ <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>
+ </androidx.constraintlayout.widget.ConstraintLayout>
- </com.google.android.material.card.MaterialCardView>
+ </com.google.android.material.card.MaterialCardView>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+ <include
+ android:id="@+id/reportLoading"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ layout="@layout/loading_indicator"
+ android:visibility="gone"/>
-</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
+</FrameLayout> \ No newline at end of file
diff --git a/androidApp/src/main/res/layout/unit_details_information.xml b/androidApp/src/main/res/layout/unit_details_information.xml
index 422b77e..cc8bbb7 100644
--- a/androidApp/src/main/res/layout/unit_details_information.xml
+++ b/androidApp/src/main/res/layout/unit_details_information.xml
@@ -1,49 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout
+<FrameLayout
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">
- <ProgressBar
- android:id="@+id/reportLoading"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/margin"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
-
- <com.google.android.material.card.MaterialCardView
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- app:cardCornerRadius="@dimen/card_border_radius"
- app:cardElevation="@dimen/card_elevation"
- app:cardUseCompatPadding="true"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:contentPadding="@dimen/card_padding">
-
- <LinearLayout
- android:id="@+id/detailsLayout"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <TextView
- android:id="@+id/nameDetail"
- style="@style/TextAppearance.AppCompat.Headline"
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <ScrollView
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent">
+
+ <com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textColor="@color/colorPrimaryDark"
- android:layout_marginBottom="@dimen/padding"
- tools:text="1AAUTO" />
+ app:cardCornerRadius="@dimen/card_border_radius"
+ app:cardElevation="@dimen/card_elevation"
+ app:cardUseCompatPadding="true"
+ app:contentPadding="@dimen/card_padding">
+
+ <LinearLayout
+ android:id="@+id/detailsLayout"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/nameDetail"
+ style="@style/TextAppearance.AppCompat.Headline"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textColor="@color/colorPrimaryDark"
+ android:layout_marginBottom="@dimen/padding"
+ tools:text="1AAUTO" />
- </LinearLayout>
+ </LinearLayout>
- </com.google.android.material.card.MaterialCardView>
+ </com.google.android.material.card.MaterialCardView>
+
+ </ScrollView>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+ <include
+ android:id="@+id/reportLoading"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ layout="@layout/loading_indicator"
+ android:visibility="gone"/>
-</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
+</FrameLayout> \ 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 0a8e23d..7210e1f 100644
--- a/androidApp/src/main/res/layout/unit_details_reports.xml
+++ b/androidApp/src/main/res/layout/unit_details_reports.xml
@@ -162,14 +162,15 @@
</LinearLayout>
- <ProgressBar
+ <include
android:id="@+id/reportLoading"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/margin"
- app:layout_constraintBottom_toTopOf="@id/periodSection"
- app:layout_constraintEnd_toEndOf="parent"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ layout="@layout/loading_indicator"
+ app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/periodSection"
+ android:visibility="gone"/>
</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/androidApp/src/main/res/layout/unit_item.xml b/androidApp/src/main/res/layout/unit_item.xml
index cccdd69..6946d1d 100644
--- a/androidApp/src/main/res/layout/unit_item.xml
+++ b/androidApp/src/main/res/layout/unit_item.xml
@@ -15,10 +15,12 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end"
- android:padding="@dimen/card_padding"
+ android:padding="@dimen/padding"
+ android:paddingStart="0dp"
android:gravity="center"
android:orientation="horizontal"
- android:visibility="visible">
+ android:visibility="visible"
+ tools:ignore="RtlSymmetry">
<com.google.android.material.button.MaterialButton
android:id="@+id/detailsButton"
@@ -27,8 +29,21 @@
android:layout_weight="1"
app:cardBackgroundColor="@color/colorAccent"
android:text="@string/unit_details"
+ android:textSize="@dimen/card_action_text"
android:textColor="@color/colorAccent"
+ android:minWidth="0dp"
+ style="?android:borderlessButtonStyle"/>
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/reportsButton"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ app:cardBackgroundColor="@color/colorAccent"
+ android:text="@string/unit_reports"
android:textSize="@dimen/card_action_text"
+ android:textColor="@color/colorAccent"
+ android:minWidth="0dp"
style="?android:borderlessButtonStyle"/>
<com.google.android.material.button.MaterialButton
@@ -37,9 +52,10 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/unit_commands"
- android:textColor="@color/colorAccent"
android:textSize="@dimen/card_action_text"
- style="?android:borderlessButtonStyle" />
+ android:textColor="@color/colorAccent"
+ android:minWidth="0dp"
+ style="?android:borderlessButtonStyle"/>
</LinearLayout>
@@ -53,9 +69,11 @@
app:cardElevation="0dp"
app:cardUseCompatPadding="true"
app:contentPadding="@dimen/card_padding"
+ app:contentPaddingLeft="0dp"
app:cardBackgroundColor="@color/darkBackground"
android:clickable="true"
- android:focusable="true">
+ android:focusable="true"
+ tools:visibility="gone">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/mainContent"
@@ -67,7 +85,7 @@
android:id="@+id/unitIcon"
android:layout_width="40dp"
android:layout_height="40dp"
- android:layout_margin="@dimen/card_icon_margin"
+ android:layout_marginHorizontal="@dimen/card_icon_margin"
android:src="@drawable/map_default"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
diff --git a/androidApp/src/main/res/layout/units_activity.xml b/androidApp/src/main/res/layout/units_activity.xml
index 86fd99c..a468151 100644
--- a/androidApp/src/main/res/layout/units_activity.xml
+++ b/androidApp/src/main/res/layout/units_activity.xml
@@ -17,19 +17,18 @@
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
- android:id="@+id/userButton"
+ android:id="@+id/displayModeToggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="@dimen/fab_margin"
android:layout_marginTop="@dimen/fab_margin"
+ android:layout_marginStart="@dimen/fab_margin"
android:backgroundTint="@android:color/white"
- android:contentDescription="@string/open_profile"
- android:src="@drawable/device_contact"
app:borderWidth="0dp"
app:elevation="@dimen/fab_elevation"
app:fabSize="mini"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ app:layout_constraintTop_toTopOf="parent"
+ tools:ignore="ContentDescription" />
<com.google.android.material.card.MaterialCardView
android:layout_width="0dp"
@@ -38,10 +37,10 @@
android:layout_marginVertical="@dimen/search_vertical_margin"
app:cardCornerRadius="@dimen/card_border_radius"
app:cardElevation="@dimen/card_elevation"
- app:layout_constraintBottom_toBottomOf="@id/displayModeToggle"
+ app:layout_constraintBottom_toBottomOf="@id/userButton"
app:layout_constraintEnd_toStartOf="@id/mapLayerToggle"
- app:layout_constraintStart_toEndOf="@id/userButton"
- app:layout_constraintTop_toTopOf="@id/displayModeToggle">
+ app:layout_constraintStart_toEndOf="@id/displayModeToggle"
+ app:layout_constraintTop_toTopOf="@id/userButton">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/searchInputLayout"
@@ -50,6 +49,8 @@
app:endIconMode="clear_text"
app:boxBackgroundMode="none"
app:boxStrokeWidth="0dp"
+ app:startIconDrawable="@drawable/icon_search"
+ app:startIconTint="@android:color/black"
app:hintEnabled="false">
<com.google.android.material.textfield.TextInputEditText
@@ -80,21 +81,22 @@
app:borderWidth="0dp"
app:elevation="@dimen/fab_elevation"
app:fabSize="mini"
- app:layout_constraintEnd_toStartOf="@id/displayModeToggle"
+ app:layout_constraintEnd_toStartOf="@id/userButton"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
- android:id="@+id/displayModeToggle"
+ android:id="@+id/userButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/fab_margin"
android:layout_marginEnd="@dimen/fab_margin"
+ android:layout_marginTop="@dimen/fab_margin"
android:backgroundTint="@android:color/white"
+ android:contentDescription="@string/open_profile"
+ android:src="@drawable/device_contact"
app:borderWidth="0dp"
app:elevation="@dimen/fab_elevation"
app:fabSize="mini"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- tools:ignore="ContentDescription" />
+ app:layout_constraintTop_toTopOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/androidApp/src/main/res/layout/user_information_activity.xml b/androidApp/src/main/res/layout/user_information_activity.xml
index 0b4924a..c409e98 100644
--- a/androidApp/src/main/res/layout/user_information_activity.xml
+++ b/androidApp/src/main/res/layout/user_information_activity.xml
@@ -6,17 +6,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
- <ProgressBar
- android:id="@+id/infoLoading"
- 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"
- app:layout_constraintBottom_toBottomOf="parent"
- android:translationZ="2dp"
- android:visibility="gone"/>
-
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/backButton"
android:layout_width="wrap_content"
@@ -31,7 +20,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
- <ScrollView
+ <FrameLayout
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="@dimen/fab_margin"
@@ -40,173 +29,186 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
- <LinearLayout
+ <ScrollView
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
+ android:layout_height="match_parent">
- <androidx.cardview.widget.CardView
- android:id="@+id/userInfoCard"
- android:layout_margin="@dimen/card_margin"
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- app:contentPadding="@dimen/card_padding"
- app:cardCornerRadius="@dimen/card_border_radius"
- app:cardElevation="@dimen/card_elevation">
+ android:orientation="vertical">
- <LinearLayout
+ <androidx.cardview.widget.CardView
+ android:id="@+id/userInfoCard"
+ android:layout_margin="@dimen/card_margin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/fields_spacing"
- android:text="@string/user_details"
- android:textAppearance="@style/TextAppearance.AppCompat.Headline"/>
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/username"
- android:textAppearance="@style/TextAppearance.AppCompat.Body2"/>
-
- <TextView
- android:id="@+id/usernameInfo"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/fields_spacing"
- tools:text="Username" />
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/email"
- android:textAppearance="@style/TextAppearance.AppCompat.Body2"/>
-
- <TextView
- android:id="@+id/emailInfo"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/fields_spacing"
- tools:text="Email" />
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/unique_id"
- android:textAppearance="@style/TextAppearance.AppCompat.Body2"/>
-
- <TextView
- android:id="@+id/idInfo"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/fields_spacing"
- tools:text="Unique ID" />
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/device_limit"
- android:textAppearance="@style/TextAppearance.AppCompat.Body2"/>
-
- <TextView
- android:id="@+id/deviceLimitInfo"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/fields_spacing"
- tools:text="Device Limit" />
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/admin"
- android:textAppearance="@style/TextAppearance.AppCompat.Body2"/>
-
- <TextView
- android:id="@+id/adminInfo"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/fields_spacing"
- tools:text="Admin" />
-
- <com.google.android.material.button.MaterialButton
- android:id="@+id/signoutButton"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/sign_out" />
-
- </LinearLayout>
-
- </androidx.cardview.widget.CardView>
-
- <androidx.cardview.widget.CardView
- android:id="@+id/aboutCard"
- android:layout_margin="@dimen/card_margin"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:contentPadding="@dimen/card_padding"
- app:cardCornerRadius="@dimen/card_border_radius"
- app:cardElevation="@dimen/card_elevation">
-
- <LinearLayout
+ app:contentPadding="@dimen/card_padding"
+ app:cardCornerRadius="@dimen/card_border_radius"
+ app:cardElevation="@dimen/card_elevation">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/fields_spacing"
+ android:text="@string/user_details"
+ android:textAppearance="@style/TextAppearance.AppCompat.Headline"/>
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/username"
+ android:textAppearance="@style/TextAppearance.AppCompat.Body2"/>
+
+ <TextView
+ android:id="@+id/usernameInfo"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/fields_spacing"
+ tools:text="Username" />
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/email"
+ android:textAppearance="@style/TextAppearance.AppCompat.Body2"/>
+
+ <TextView
+ android:id="@+id/emailInfo"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/fields_spacing"
+ tools:text="Email" />
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/unique_id"
+ android:textAppearance="@style/TextAppearance.AppCompat.Body2"/>
+
+ <TextView
+ android:id="@+id/idInfo"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/fields_spacing"
+ tools:text="Unique ID" />
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/device_limit"
+ android:textAppearance="@style/TextAppearance.AppCompat.Body2"/>
+
+ <TextView
+ android:id="@+id/deviceLimitInfo"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/fields_spacing"
+ tools:text="Device Limit" />
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/admin"
+ android:textAppearance="@style/TextAppearance.AppCompat.Body2"/>
+
+ <TextView
+ android:id="@+id/adminInfo"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/fields_spacing"
+ tools:text="Admin" />
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/signoutButton"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/sign_out" />
+
+ </LinearLayout>
+
+ </androidx.cardview.widget.CardView>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/aboutCard"
+ android:layout_margin="@dimen/card_margin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/fields_spacing"
- android:text="@string/about_details"
- android:textAppearance="@style/TextAppearance.AppCompat.Headline"/>
-
- <ImageView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/fields_spacing"
- android:contentDescription="@string/about_logo"
- android:src="@drawable/about_logo" />
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/fields_spacing"
- android:text="@string/about_text"
- android:maxLines="10"/>
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/app_version"
- android:textAppearance="@style/TextAppearance.AppCompat.Body2"/>
-
- <TextView
- android:id="@+id/appVersion"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/fields_spacing"
- tools:text="1.0" />
-
- <com.google.android.material.button.MaterialButton
- android:id="@+id/sourceCodeButton"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/source_code" />
-
- <com.google.android.material.button.MaterialButton
- android:id="@+id/websiteButton"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/open_website" />
-
- </LinearLayout>
-
- </androidx.cardview.widget.CardView>
-
- </LinearLayout>
+ app:contentPadding="@dimen/card_padding"
+ app:cardCornerRadius="@dimen/card_border_radius"
+ app:cardElevation="@dimen/card_elevation">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/fields_spacing"
+ android:text="@string/about_details"
+ android:textAppearance="@style/TextAppearance.AppCompat.Headline"/>
+
+ <ImageView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/fields_spacing"
+ android:contentDescription="@string/about_logo"
+ android:src="@drawable/about_logo" />
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/fields_spacing"
+ android:text="@string/about_text"
+ android:maxLines="10"/>
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/app_version"
+ android:textAppearance="@style/TextAppearance.AppCompat.Body2"/>
+
+ <TextView
+ android:id="@+id/appVersion"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/fields_spacing"
+ tools:text="1.0" />
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/sourceCodeButton"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/source_code" />
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/websiteButton"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/open_website" />
+
+ </LinearLayout>
+
+ </androidx.cardview.widget.CardView>
+
+ </LinearLayout>
+
+ </ScrollView>
+
+ <include
+ android:id="@+id/infoLoading"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ layout="@layout/loading_indicator"
+ android:visibility="visible"/>
- </ScrollView>
+ </FrameLayout>
</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 7ebf7d2..bd3a281 100644
--- a/androidApp/src/main/res/values-es-rMX/strings.xml
+++ b/androidApp/src/main/res/values-es-rMX/strings.xml
@@ -9,6 +9,10 @@
<string name="login_password">Contraseña</string>
<string name="login_login">Iniciar sesión</string>
+ <string name="login_username_missing">Falta el nombre de usuario</string>
+ <string name="login_password_missing">Falta la contraseña</string>
+ <string name="login_login_failed">Falló el inicio de sesión</string>
+
<!-- UnitsActivity -->
<string name="toggle_list">Cambiar a lista de dispositivos</string>
<string name="toggle_map">Cambiar a mapa</string>
@@ -59,7 +63,7 @@
<string name="unit_details">Detalles</string>
<string name="unit_reports">Reportes</string>
<string name="unit_commands">Comandos</string>
- <string name="units_search">Escribe para buscar</string>
+ <string name="units_search">Buscar</string>
<!-- Unit Information -->
<string name="unit_info_contact">Contacto</string>
diff --git a/androidApp/src/main/res/values/dimen.xml b/androidApp/src/main/res/values/dimen.xml
index 906c4af..271a12b 100644
--- a/androidApp/src/main/res/values/dimen.xml
+++ b/androidApp/src/main/res/values/dimen.xml
@@ -3,16 +3,19 @@
<dimen name="padding">8dp</dimen>
<dimen name="margin">16dp</dimen>
+ <!-- Login -->
+ <dimen name="about_logo_height">160dp</dimen>
+
<!-- CardView -->
<dimen name="card_border_radius">20dp</dimen>
<dimen name="card_elevation">8dp</dimen>
<dimen name="card_large_padding">32dp</dimen>
<dimen name="card_padding">16dp</dimen>
<dimen name="card_margin">16dp</dimen>
- <dimen name="card_icon_margin">5dp</dimen>
+ <dimen name="card_icon_margin">10dp</dimen>
<!-- Card Buttons -->
- <dimen name="card_action_text">12sp</dimen>
+ <dimen name="card_action_text">11sp</dimen>
<!-- Search -->
<dimen name="search_horizontal_margin">8dp</dimen>
diff --git a/androidApp/src/main/res/values/strings.xml b/androidApp/src/main/res/values/strings.xml
index 5f9714e..07419f3 100644
--- a/androidApp/src/main/res/values/strings.xml
+++ b/androidApp/src/main/res/values/strings.xml
@@ -32,6 +32,10 @@
<string name="login_password">Password</string>
<string name="login_login">Login</string>
+ <string name="login_username_missing">Username is missing</string>
+ <string name="login_password_missing">Password is missing</string>
+ <string name="login_login_failed">Login failed</string>
+
<!-- UnitsActivity -->
<string name="toggle_list">Switch to device list</string>
<string name="toggle_map">Switch to map</string>
@@ -82,7 +86,7 @@
<string name="unit_details">Details</string>
<string name="unit_reports">Reports</string>
<string name="unit_commands">Commands</string>
- <string name="units_search">Type to search</string>
+ <string name="units_search">Search</string>
<!-- Unit Information -->
<string name="unit_info_contact">Contact</string>