Quickly polish login screen

This commit is contained in:
ganfra 2018-11-02 11:05:11 +01:00
parent 1cc19a90bc
commit 891d7b3323
4 changed files with 60 additions and 50 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View file

@ -1,68 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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"
android:orientation="vertical"
tools:context=".features.login.LoginActivity">
android:layout_height="match_parent">
<EditText
android:id="@+id/loginField"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:ems="10"
android:hint="Name"
android:inputType="text"
android:singleLine="false"
android:text="ganfra07086"
app:layout_constraintBottom_toTopOf="@+id/passwordField"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.503"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="spread_inside" />
<EditText
android:id="@+id/passwordField"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Password"
android:inputType="textPassword"
android:text="111111"
app:layout_constraintEnd_toEndOf="@+id/loginField"
app:layout_constraintStart_toStartOf="@+id/loginField"
app:layout_constraintTop_toBottomOf="@+id/loginField" />
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:visibility="gone"
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="24dp">
<ImageView
android:id="@+id/logoImageView"
android:layout_width="wrap_content"
android:layout_height="100dp"
android:src="@drawable/logo_login" />
<EditText
android:id="@+id/loginField"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:hint="Username"
android:inputType="textEmailAddress"
android:maxLines="1" />
<EditText
android:id="@+id/passwordField"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:ems="10"
android:hint="Password"
android:inputType="textPassword"
android:maxLines="1" />
</LinearLayout>
</ScrollView>
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_centerInParent="true"
android:layout_margin="8dp"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@+id/authenticateButton"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/authenticateButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:layout_marginBottom="8dp"
android:layout_margin="16dp"
android:text="Authenticate"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>

View file

@ -1,5 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Widget.Button" parent="Widget.AppCompat.Button">
<item name="android:minHeight">48dp</item>
<item name="android:background">?attr/colorAccent</item>
<item name="android:textColor">@android:color/white</item>
</style>
</resources>

View file

@ -5,6 +5,7 @@
<item name="colorPrimary">@color/dark</item>
<item name="colorPrimaryDark">@color/dark</item>
<item name="colorAccent">@color/pale_teal</item>
<item name="buttonStyle">@style/Widget.Button</item>
</style>
<style name="Base.Theme.Riot" parent="Base.V1.Theme.Riot" />