aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/res/layout/login.xml
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
commit6aa78c8ddbcdeaace0f4596e7c717dafef036f03 (patch)
tree2bfcaff8312058e4c16cc238ded881f59727983e /androidApp/src/main/res/layout/login.xml
parentd16483ddb5f9989315db95fe2d70747c04ebc657 (diff)
downloadetbsa-trackermap-mobile-6aa78c8ddbcdeaace0f4596e7c717dafef036f03.tar.gz
etbsa-trackermap-mobile-6aa78c8ddbcdeaace0f4596e7c717dafef036f03.tar.bz2
etbsa-trackermap-mobile-6aa78c8ddbcdeaace0f4596e7c717dafef036f03.zip
Improved loading indicators, improved layout semantics, added translations and changed default view to MAP
Diffstat (limited to 'androidApp/src/main/res/layout/login.xml')
-rw-r--r--androidApp/src/main/res/layout/login.xml142
1 files changed, 89 insertions, 53 deletions
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