diff options
Diffstat (limited to 'androidApp/src/main/res/layout/login.xml')
-rw-r--r-- | androidApp/src/main/res/layout/login.xml | 249 |
1 files changed, 134 insertions, 115 deletions
diff --git a/androidApp/src/main/res/layout/login.xml b/androidApp/src/main/res/layout/login.xml index 1de3f12..ec3925c 100644 --- a/androidApp/src/main/res/layout/login.xml +++ b/androidApp/src/main/res/layout/login.xml @@ -1,132 +1,151 @@ <?xml version="1.0" encoding="utf-8"?> -<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="match_parent"> - - <androidx.constraintlayout.widget.ConstraintLayout +<androidx.constraintlayout.widget.ConstraintLayout + android:name="mx.trackermap.TrackerMap.android.session.LoginFragment" + 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"> - <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" + <include + android:id="@+id/offlineBanner" + layout="@layout/offline_banner" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" - 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_constraintEnd_toEndOf="parent" - android:layout_marginHorizontal="@dimen/card_margin" - android:layout_marginBottom="16dp"> + android:visibility="gone" + tools:visibility="visible" /> - <androidx.constraintlayout.widget.ConstraintLayout - android:layout_width="match_parent" + <FrameLayout + android:layout_width="match_parent" + android:layout_height="0dp" + app:layout_constraintTop_toBottomOf="@id/offlineBanner" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBottom_toBottomOf="parent"> + + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + 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" + android:layout_marginHorizontal="@dimen/card_margin" + app:srcCompat="@drawable/about_logo" /> + + <androidx.cardview.widget.CardView + android:layout_width="0dp" 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" + 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_constraintEnd_toEndOf="parent" + android:layout_marginHorizontal="@dimen/card_margin" + android:layout_marginBottom="16dp"> + + <androidx.constraintlayout.widget.ConstraintLayout 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.TextInputEditText - android:id="@+id/usernameEditText" + 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: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="@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/urlInputLayout" - android:layout_marginTop="@dimen/fields_spacing"> - - <com.google.android.material.textfield.TextInputEditText - android:id="@+id/passwordEditText" + 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.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:inputType="textPassword"/> - - </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" - android:visibility="gone"> - - <com.google.android.material.textfield.TextInputEditText - android:id="@+id/urlEditText" + 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/urlInputLayout" + android:layout_marginTop="@dimen/fields_spacing"> + + <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 + android:id="@+id/urlInputLayout" + style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" 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/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="@dimen/fields_large_spacing" - android:text="@string/login_login"/> - - </androidx.constraintlayout.widget.ConstraintLayout> - - </androidx.cardview.widget.CardView> - - </androidx.constraintlayout.widget.ConstraintLayout> - - <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 + 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" + android:visibility="gone"> + + <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/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="@dimen/fields_large_spacing" + android:text="@string/login_login"/> + + </androidx.constraintlayout.widget.ConstraintLayout> + + </androidx.cardview.widget.CardView> + + </androidx.constraintlayout.widget.ConstraintLayout> + + <include + android:id="@+id/infoLoading" + android:layout_width="match_parent" + android:layout_height="match_parent" + layout="@layout/loading_indicator" + android:visibility="gone"/> + + </FrameLayout> +</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file |