aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/res/layout
diff options
context:
space:
mode:
authorIsidro Henoch <imhenoch@protonmail.com>2021-12-06 01:04:55 -0600
committerIsidro Henoch <imhenoch@protonmail.com>2021-12-06 01:04:55 -0600
commit93c204bcd190b242f1dea49e52f28c795e4d0b92 (patch)
tree7fc0b2908afa4a63a1f144bc2d2718d91500333d /androidApp/src/main/res/layout
parente51f039b61b0a653b02f5d4d577bfe8f83286a16 (diff)
downloadetbsa-trackermap-mobile-93c204bcd190b242f1dea49e52f28c795e4d0b92.tar.gz
etbsa-trackermap-mobile-93c204bcd190b242f1dea49e52f28c795e4d0b92.tar.bz2
etbsa-trackermap-mobile-93c204bcd190b242f1dea49e52f28c795e4d0b92.zip
WIP: Implements the Login functionality
- Adds multiple android dependencies, for DI and some utilities - Updates colors and styles - Adds an Application - Adds the Login Fragment and ViewModel
Diffstat (limited to 'androidApp/src/main/res/layout')
-rw-r--r--androidApp/src/main/res/layout/login.xml74
-rw-r--r--androidApp/src/main/res/layout/login_activity.xml31
2 files changed, 105 insertions, 0 deletions
diff --git a/androidApp/src/main/res/layout/login.xml b/androidApp/src/main/res/layout/login.xml
new file mode 100644
index 0000000..0a5f07a
--- /dev/null
+++ b/androidApp/src/main/res/layout/login.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.cardview.widget.CardView
+ 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="20dp"
+ app:cardElevation="5dp"
+ app:cardUseCompatPadding="true">
+
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingVertical="32dp"
+ android:paddingHorizontal="16dp">
+
+ <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="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.TextInputEditText
+ android:id="@+id/usernameEditText"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:inputType="textEmailAddress"/>
+
+ </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="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/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="Log in"/>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+</androidx.cardview.widget.CardView> \ 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
new file mode 100644
index 0000000..f1df817
--- /dev/null
+++ b/androidApp/src/main/res/layout/login_activity.xml
@@ -0,0 +1,31 @@
+<?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">
+
+ <androidx.appcompat.widget.AppCompatImageView
+ android:id="@+id/bannerImage"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ app:layout_constraintWidth_percent="0.7"
+ 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" />
+
+ <fragment
+ 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_marginStart="16dp"
+ android:layout_marginEnd="16dp"
+ android:layout_marginBottom="16dp"/>
+
+</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file