From 824ed3f2829bad5e174d28a99701b846cd8d1215 Mon Sep 17 00:00:00 2001 From: Dominik Korsa Date: Sun, 17 Mar 2019 19:57:25 +0100 Subject: [PATCH] Centre the login form (#283) --- app/src/main/AndroidManifest.xml | 1 - .../main/res/layout/fragment_login_form.xml | 28 +++++++++++++------ .../main/res/layout/fragment_login_symbol.xml | 23 +++++++++------ 3 files changed, 35 insertions(+), 17 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 81e252cba..bb2066997 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -27,7 +27,6 @@ android:theme="@style/WulkanowyTheme.SplashScreen"> - diff --git a/app/src/main/res/layout/fragment_login_form.xml b/app/src/main/res/layout/fragment_login_form.xml index a3ac4d129..81baf4afc 100644 --- a/app/src/main/res/layout/fragment_login_form.xml +++ b/app/src/main/res/layout/fragment_login_form.xml @@ -28,16 +28,21 @@ android:id="@+id/loginFormHeader" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="24dp" - android:layout_marginLeft="24dp" - android:layout_marginTop="24dp" - android:layout_marginEnd="24dp" - android:layout_marginRight="24dp" + android:layout_marginStart="32dp" + android:layout_marginLeft="32dp" + android:layout_marginTop="48dp" + android:layout_marginEnd="32dp" + android:layout_marginRight="32dp" + android:gravity="center_horizontal" android:text="@string/login_header_default" android:textSize="16sp" + app:fontFamily="sans-serif-light" + app:layout_constraintBottom_toTopOf="@+id/loginFormNameLayout" app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_chainStyle="packed" /> @@ -63,6 +70,7 @@ android:inputType="textEmailAddress" android:maxLines="1" /> + @@ -105,7 +115,9 @@ android:layout_marginRight="24dp" android:background="@drawable/ic_login_outlined_border" android:orientation="vertical" + app:layout_constraintBottom_toTopOf="@+id/loginFormSignIn" app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/loginFormPassLayout"> @@ -141,7 +153,7 @@ android:layout_marginTop="48dp" android:layout_marginEnd="24dp" android:layout_marginRight="24dp" - android:layout_marginBottom="24dp" + android:layout_marginBottom="48dp" android:text="@string/login_sign_in" android:textAppearance="?android:textAppearanceSmall" android:textColor="@android:color/white" diff --git a/app/src/main/res/layout/fragment_login_symbol.xml b/app/src/main/res/layout/fragment_login_symbol.xml index 11305f9ba..6cdf7ef03 100644 --- a/app/src/main/res/layout/fragment_login_symbol.xml +++ b/app/src/main/res/layout/fragment_login_symbol.xml @@ -27,16 +27,21 @@ android:id="@+id/loginSymbolHeader" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="24dp" - android:layout_marginLeft="24dp" - android:layout_marginTop="24dp" - android:layout_marginEnd="24dp" - android:layout_marginRight="24dp" + android:layout_marginStart="32dp" + android:layout_marginLeft="32dp" + android:layout_marginTop="48dp" + android:layout_marginEnd="32dp" + android:layout_marginRight="32dp" + android:gravity="center_horizontal" android:text="@string/login_header_symbol" android:textSize="16sp" + app:fontFamily="sans-serif-light" + app:layout_constraintBottom_toTopOf="@+id/loginSymbolNameLayout" app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_chainStyle="packed" /> @@ -76,7 +83,7 @@ android:layout_marginTop="48dp" android:layout_marginEnd="24dp" android:layout_marginRight="24dp" - android:layout_marginBottom="24dp" + android:layout_marginBottom="48dp" android:text="@string/login_sign_in" android:textAppearance="?android:textAppearanceSmall" android:textColor="@android:color/white"