diff options
author | Marvin Borner | 2018-09-09 19:27:09 +0200 |
---|---|---|
committer | Marvin Borner | 2018-09-09 19:27:09 +0200 |
commit | 4821b9e70674f1f798fe57736811e1139691105b (patch) | |
tree | ea7e71e3692c32e09ce8605c3e89b419a861f59b /app/src | |
parent | bd0c9e48638e1706cc0f5201dc1182773d9196de (diff) |
Further login screen designing :lipstick: :art:
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/res/drawable/btn_fab_submit_gradient.xml | 20 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_fab_submit.xml | 10 | ||||
-rw-r--r-- | app/src/main/res/drawable/img_login_portrait.jpg | bin | 0 -> 4249729 bytes | |||
-rw-r--r-- | app/src/main/res/drawable/text_email_top_background.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/drawable/text_password_bottom_background.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_login.xml | 47 | ||||
-rw-r--r-- | app/src/main/res/values/dimens.xml | 3 |
7 files changed, 78 insertions, 20 deletions
diff --git a/app/src/main/res/drawable/btn_fab_submit_gradient.xml b/app/src/main/res/drawable/btn_fab_submit_gradient.xml new file mode 100644 index 0000000..ad529d7 --- /dev/null +++ b/app/src/main/res/drawable/btn_fab_submit_gradient.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item> + <shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="oval"> + <gradient + android:angle="0" + android:endColor="#ff5252" + android:startColor="#f9a825" + android:type="linear" /> + </shape> + </item> + <item + android:bottom="10dp" + android:drawable="@drawable/ic_fab_submit" + android:gravity="center" + android:left="10dp" + android:right="10dp" + android:top="10dp" /> +</layer-list>
\ No newline at end of file diff --git a/app/src/main/res/drawable/ic_fab_submit.xml b/app/src/main/res/drawable/ic_fab_submit.xml new file mode 100644 index 0000000..2cee69d --- /dev/null +++ b/app/src/main/res/drawable/ic_fab_submit.xml @@ -0,0 +1,10 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:tint="#FFFFFF" + android:viewportHeight="24.0" + android:viewportWidth="24.0"> + <path + android:fillColor="#FF000000" + android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z" /> +</vector> diff --git a/app/src/main/res/drawable/img_login_portrait.jpg b/app/src/main/res/drawable/img_login_portrait.jpg Binary files differnew file mode 100644 index 0000000..e2c666f --- /dev/null +++ b/app/src/main/res/drawable/img_login_portrait.jpg diff --git a/app/src/main/res/drawable/text_email_top_background.xml b/app/src/main/res/drawable/text_email_top_background.xml new file mode 100644 index 0000000..54e66e8 --- /dev/null +++ b/app/src/main/res/drawable/text_email_top_background.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <size android:height="60dp" /> + <solid android:color="#FFFFFF" /> + <corners + android:topLeftRadius="15dp" + android:topRightRadius="15dp" /> +</shape>
\ No newline at end of file diff --git a/app/src/main/res/drawable/text_password_bottom_background.xml b/app/src/main/res/drawable/text_password_bottom_background.xml new file mode 100644 index 0000000..c8432bf --- /dev/null +++ b/app/src/main/res/drawable/text_password_bottom_background.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <size android:height="60dp" /> + <solid android:color="#FFFFFF" /> + <corners + android:bottomLeftRadius="15dp" + android:bottomRightRadius="15dp" /> +</shape>
\ No newline at end of file diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml index 6410385..da8bae3 100644 --- a/app/src/main/res/layout/activity_login.xml +++ b/app/src/main/res/layout/activity_login.xml @@ -4,6 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="@android:color/background_dark" android:gravity="center_horizontal" android:padding="0dp" android:paddingBottom="@dimen/activity_vertical_margin" @@ -18,6 +19,7 @@ android:id="@+id/image_background" android:layout_width="match_parent" android:layout_height="match_parent" + android:alpha="0.7" android:scaleType="centerCrop" app:srcCompat="@drawable/img_login_portrait" /> @@ -42,50 +44,57 @@ android:id="@+id/email" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginBottom="8dp" - android:layout_marginEnd="8dp" - android:layout_marginStart="8dp" + android:layout_marginEnd="16dp" + android:layout_marginStart="16dp" + android:background="@drawable/text_email_top_background" android:hint="@string/prompt_email" android:inputType="textEmailAddress" android:maxLines="1" + android:paddingLeft="10dp" + android:paddingRight="10dp" android:singleLine="true" + android:textColor="@android:color/darker_gray" + android:textColorHint="@android:color/darker_gray" app:layout_constraintBottom_toTopOf="@+id/password" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="1.0" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintVertical_chainStyle="packed" /> + app:layout_constraintStart_toStartOf="parent" /> <EditText android:id="@+id/password" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginBottom="8dp" - android:layout_marginEnd="8dp" - android:layout_marginStart="8dp" + android:layout_marginBottom="100dp" + android:layout_marginEnd="16dp" + android:layout_marginStart="16dp" + android:background="@drawable/text_password_bottom_background" android:hint="@string/prompt_password" android:imeActionId="6" android:imeActionLabel="@string/action_sign_in_short" android:imeOptions="actionUnspecified" android:inputType="textPassword" android:maxLines="1" + android:paddingLeft="10dp" + android:paddingRight="10dp" android:singleLine="true" - app:layout_constraintBottom_toTopOf="@+id/button_sign_in" - app:layout_constraintEnd_toEndOf="@+id/button_sign_in" + android:textColor="@android:color/darker_gray" + android:textColorHint="@android:color/darker_gray" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.0" - app:layout_constraintStart_toStartOf="@+id/button_sign_in" /> + app:layout_constraintStart_toStartOf="parent" /> - <Button + <android.support.design.widget.FloatingActionButton android:id="@+id/button_sign_in" - style="?android:textAppearanceSmall" - android:layout_width="0dp" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginBottom="100dp" - android:text="@string/action_sign_in" - android:textStyle="bold" + android:layout_marginBottom="72dp" + android:layout_marginEnd="32dp" + android:clickable="true" + app:fabSize="normal" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintHorizontal_bias="0.0" - app:layout_constraintStart_toStartOf="parent" /> + app:srcCompat="@drawable/btn_fab_submit_gradient" /> </android.support.constraint.ConstraintLayout> diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 617af6a..1b4a395 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -1,4 +1,5 @@ -<resources> +<resources xmlns:tools="http://schemas.android.com/tools"> + <dimen name="design_fab_image_size" tools:override="true">56dp</dimen> <dimen name="fab_margin">16dp</dimen> <!-- Default screen margins, per the Android Design guidelines. --> <dimen name="activity_horizontal_margin">16dp</dimen> |