activity_main.xml 5.03 KB
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:weightSum="2">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1.4">

            <ImageView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:scaleType="fitXY"
                android:src="@mipmap/bg" />

            <ImageView
                android:layout_width="150dp"
                android:layout_height="80dp"
                android:layout_margin="30dp"
                android:scaleType="fitXY"
                android:src="@mipmap/logo" />
        </RelativeLayout>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_weight=".6"
            android:background="@color/colorWhite">

            <RelativeLayout
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="30dp"
                android:layout_centerInParent="true"
                android:layout_marginRight="30dp"
                android:background="#fff"
                android:elevation="4dp"
                android:gravity="center"
                android:orientation="vertical"
                android:padding="0dp">

                <LinearLayout
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="10dp"
                    android:orientation="vertical"
                    android:paddingLeft="20dp"
                    android:paddingRight="20dp">

                    <android.support.design.widget.TextInputLayout
                        android:layout_width="match_parent"
                        android:layout_height="50dp">

                        <EditText
                            android:layout_width="fill_parent"
                            android:layout_height="wrap_content"
                            android:drawableLeft="@drawable/user"
                            android:drawablePadding="5dp"
                            android:drawableTint="@color/colorPrimary"
                            android:hint="User Name"
                            android:inputType="textEmailAddress"
                            android:paddingBottom="16dp"
                            android:singleLine="true" />
                    </android.support.design.widget.TextInputLayout>

                    <android.support.design.widget.TextInputLayout
                        android:layout_width="match_parent"
                        android:layout_marginTop="15dp"
                        android:layout_height="50dp">

                        <EditText
                            android:layout_width="fill_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="16dp"
                            android:drawableLeft="@drawable/lock"
                            android:drawablePadding="5dp"
                            android:drawableTint="@color/colorPrimary"
                            android:hint="Password"
                            android:inputType="numberPassword"
                            android:paddingBottom="16dp"
                            android:singleLine="true" />
                    </android.support.design.widget.TextInputLayout>

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="right"
                        android:paddingTop="5dp"
                        android:text="Forgot Password?" />


                    <Button
                        android:id="@+id/button"
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:layout_margin="22dp"
                        android:background="@color/colorPrimary"
                        android:drawableLeft="@drawable/lock"
                        android:drawablePadding="5dp"
                        android:drawableTint="@color/colorWhite"
                        android:text="Log in to your account"
                        android:textAllCaps="false"
                        android:textColor="@color/colorAccent"
                        android:textSize="14sp" />
                </LinearLayout>
            </RelativeLayout>
        </RelativeLayout>
    </LinearLayout>
</RelativeLayout>