aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/res
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-24 15:12:11 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-24 15:12:11 -0600
commitac5eeffba586954042c9efcf196c2efcfe854c4a (patch)
tree20378bce6484d4c68203556d9f4e76d18fc566f3 /androidApp/src/main/res
parent0381ae0b930ceb7b43ef1e66950c9bd6f9dfcc56 (diff)
parent7f1388bc554a3ee68a1865d2a219395805a79575 (diff)
downloadetbsa-trackermap-mobile-ac5eeffba586954042c9efcf196c2efcfe854c4a.tar.gz
etbsa-trackermap-mobile-ac5eeffba586954042c9efcf196c2efcfe854c4a.tar.bz2
etbsa-trackermap-mobile-ac5eeffba586954042c9efcf196c2efcfe854c4a.zip
Merged main from upstream (unbranded)
Diffstat (limited to 'androidApp/src/main/res')
-rw-r--r--androidApp/src/main/res/layout/devices_fragment.xml3
-rw-r--r--androidApp/src/main/res/layout/login.xml29
-rw-r--r--androidApp/src/main/res/layout/units_activity.xml5
-rw-r--r--androidApp/src/main/res/layout/user_information_activity.xml14
-rw-r--r--androidApp/src/main/res/values-es-rMX/strings.xml2
-rw-r--r--androidApp/src/main/res/values/strings.xml3
6 files changed, 49 insertions, 7 deletions
diff --git a/androidApp/src/main/res/layout/devices_fragment.xml b/androidApp/src/main/res/layout/devices_fragment.xml
index 1dd1690..6e4db3f 100644
--- a/androidApp/src/main/res/layout/devices_fragment.xml
+++ b/androidApp/src/main/res/layout/devices_fragment.xml
@@ -2,7 +2,8 @@
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent"
+ android:background="@color/background">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/devicesList"
diff --git a/androidApp/src/main/res/layout/login.xml b/androidApp/src/main/res/layout/login.xml
index 7c79e5c..78c3e46 100644
--- a/androidApp/src/main/res/layout/login.xml
+++ b/androidApp/src/main/res/layout/login.xml
@@ -70,8 +70,8 @@
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">
+ app:layout_constraintBottom_toTopOf="@id/urlInputLayout"
+ android:layout_marginTop="@dimen/fields_spacing">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/passwordEditText"
@@ -81,17 +81,38 @@
</com.google.android.material.textfield.TextInputLayout>
+ <com.google.android.material.textfield.TextInputLayout
+ android:id="@+id/urlInputLayout"
+ style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/login_url"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.5"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/passwordInputLayout"
+ app:layout_constraintBottom_toTopOf="@id/signinButton"
+ android:layout_marginTop="@dimen/fields_spacing">
+
+ <com.google.android.material.textfield.TextInputEditText
+ android:id="@+id/urlEditText"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:inputType="textUri"/>
+
+ </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_constraintTop_toBottomOf="@id/urlInputLayout"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.5"
- android:layout_marginTop="24dp"
+ android:layout_marginTop="@dimen/fields_large_spacing"
android:text="@string/login_login"/>
</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/androidApp/src/main/res/layout/units_activity.xml b/androidApp/src/main/res/layout/units_activity.xml
index 5abb95b..60a77db 100644
--- a/androidApp/src/main/res/layout/units_activity.xml
+++ b/androidApp/src/main/res/layout/units_activity.xml
@@ -5,7 +5,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawerLayout"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent"
+ android:animateLayoutChanges="true">
<androidx.fragment.app.FragmentContainerView
android:id="@+id/displayContainer"
@@ -74,7 +75,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/fab_margin"
- android:layout_marginEnd="@dimen/fab_margin"
+ android:layout_marginEnd="@dimen/search_horizontal_margin"
android:backgroundTint="@android:color/white"
android:contentDescription="@string/switch_layer"
android:src="@drawable/icon_layers"
diff --git a/androidApp/src/main/res/layout/user_information_activity.xml b/androidApp/src/main/res/layout/user_information_activity.xml
index 2f0486c..3ed9048 100644
--- a/androidApp/src/main/res/layout/user_information_activity.xml
+++ b/androidApp/src/main/res/layout/user_information_activity.xml
@@ -131,6 +131,20 @@
android:layout_marginBottom="@dimen/fields_spacing"
tools:text="Admin" />
+ <TextView
+ android:id="@+id/serverInfoLabel"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/login_url"
+ android:textAppearance="@style/TextAppearance.AppCompat.Body2"/>
+
+ <TextView
+ android:id="@+id/serverInfo"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/fields_spacing"
+ tools:text="@string/default_server_url" />
+
<com.google.android.material.button.MaterialButton
android:id="@+id/signoutButton"
android:layout_width="match_parent"
diff --git a/androidApp/src/main/res/values-es-rMX/strings.xml b/androidApp/src/main/res/values-es-rMX/strings.xml
index 28aee79..eeb7149 100644
--- a/androidApp/src/main/res/values-es-rMX/strings.xml
+++ b/androidApp/src/main/res/values-es-rMX/strings.xml
@@ -10,10 +10,12 @@
<!-- LoginActivity -->
<string name="login_username">Nombre de usuario</string>
<string name="login_password">Contraseña</string>
+ <string name="login_url">URL del servidor</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_url_missing">Falta la URL del servidor</string>
<string name="login_login_failed">Falló el inicio de sesión</string>
<!-- UnitsActivity -->
diff --git a/androidApp/src/main/res/values/strings.xml b/androidApp/src/main/res/values/strings.xml
index 4f5a213..865368e 100644
--- a/androidApp/src/main/res/values/strings.xml
+++ b/androidApp/src/main/res/values/strings.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name" translatable="false">ETBSA</string>
+ <string name="default_server_url" translatable="false">https://etbsa.net/api</string>
<!-- Non translatable -->
<string name="app_website_url" translatable="false">https://etbsa.com.mx/</string>
@@ -23,10 +24,12 @@
<!-- LoginActivity -->
<string name="login_username">Username</string>
<string name="login_password">Password</string>
+ <string name="login_url">Server URL</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_url_missing">Server URL is missing</string>
<string name="login_login_failed">Login failed</string>
<!-- UnitsActivity -->