Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Task 3:- Design Login Page

Logic_ac vity.xml:-

<?xml version="1.0" encoding="utf-8"?>


<LinearLayout 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:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".LoginActivity"
>

<ImageView
android:id="@+id/ivLoginLogo"
android:layout_width="220sp"
android:layout_height="220sp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="25sp"
android:layout_marginBottom="40sp"
android:src="@drawable/netflix2"
/>

<androidx.cardview.widget.CardView
android:id="@+id/cvLogin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5sp"
app:cardBackgroundColor="@color/verylightred"
app:cardCornerRadius="18sp"
app:cardElevation="205dp"
android:layout_marginTop="122sp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_marginTop="22dp"
>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/acme"
android:gravity="center"
android:text="@string/login_here"
android:textColor="@color/black"
android:textSize="27sp"
android:textStyle="bold"
android:layout_marginTop="10dp"
/>

<EditText
android:id="@+id/etLoginUserName"
android:layout_width="match_parent"
android:layout_height="55sp"
android:layout_margin="4sp"
android:fontFamily="sans-serif-condensed"
android:hint="@string/username"
android:inputType="text"
android:textColorHint="@color/black"
android:textSize="21dp"
android:textStyle="bold"
android:background="@drawable/etpgshape"
android:paddingLeft="8sp"
/>

<EditText
android:layout_width="match_parent"
android:layout_height="55sp"
android:id="@+id/etLoginPassword"
android:hint="@string/password"
android:textColorHint="@color/black"
android:textStyle="bold"
android:textSize="21sp"
android:fontFamily="sans-serif-condensed"
android:inputType="textPassword"
android:layout_margin="4sp"
android:background="@drawable/etpgshape"
android:paddingLeft="8sp"

/>

<androidx.appcompat.widget.AppCompatButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btnLogin"
android:text="@string/login"
android:textColor="@color/lightred"
android:textStyle="bold"
android:textSize="16sp"
android:layout_gravity="center_horizontal"
/>

<TextView
android:id="@+id/tvLoginNewUser"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-medium"
android:text="@string/new_user_click_here"
android:textColor="@color/black"
android:textSize="16sp"
android:gravity="center"
android:layout_marginTop="15sp"
android:layout_marginBottom="20sp"/>

</LinearLayout>

</androidx.cardview.widget.CardView>

</LinearLayout>

Etpgshape:-

<?xml version="1.0" encoding="utf-8"?>


<shape xmlns:android="http://schemas.android.com/apk/res/android">

<stroke
android:width="1sp"
android:color="@color/black"/>
<corners
android:radius="160sp"/>
</shape>

You might also like