0% found this document useful (0 votes)
9 views3 pages

Task 3

Uploaded by

dukarepriyal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

Task 3

Uploaded by

dukarepriyal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Task 3: Design The Login Activity

Login_activity.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"
android:background="#ECE8CD">

<ImageView
android:layout_width="200sp"
android:layout_height="200sp"
android:contentDescription="@string/todo"
android:src="@drawable/logo"
android:layout_gravity="center"
android:id="@+id/logoLogin"
android:layout_marginTop="20sp"/>

<TextView

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title"
android:textSize="25sp"
android:textColor="#8E0217"
android:fontFamily="@font/almendra"
android:id="@+id/title"
android:layout_gravity="center"
android:textStyle="bold"/>

<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20sp"
android:id="@+id/cvlogin"
app:cardCornerRadius="19sp"
app:cardBackgroundColor="#C9CBD6"
app:cardElevation="20sp">

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

<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/login"
android:gravity="center"
android:textColor="@color/darkblue"
android:fontFamily="@font/almendra"
android:textSize="25sp"
android:textStyle="bold"
android:layout_marginTop="14sp"/>

<EditText
android:layout_width="match_parent"
android:layout_height="60sp"
android:hint="@string/username"
android:textColorHint="#0A1A75"
android:id="@+id/LoginUsername"
android:fontFamily="@font/almendra"
android:textSize="20sp"
android:layout_marginTop="30sp"
android:paddingLeft="5sp"
android:layout_margin="12sp"
android:inputType="text"
android:textStyle="bold"
android:background="@drawable/edback"/>

<EditText
android:layout_width="match_parent"
android:layout_height="60sp"
android:hint="@string/password"
android:textColorHint="#0A1A75"
android:id="@+id/LoginPassword"
android:paddingLeft="5sp"
android:fontFamily="@font/almendra"
android:textSize="20sp"
android:layout_marginTop="16sp"
android:layout_margin="12sp"
android:textStyle="bold"
android:inputType="text"
tools:ignore="TextFields"
android:background="@drawable/edback"/>

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/Loginbtn"
android:layout_width="wrap_content"
android:layout_height="30sp"
android:layout_gravity="center"
android:layout_margin="20sp"
android:background="@drawable/etbgshape"
android:text="@string/btn"
android:textStyle="bold"
android:fontFamily="@font/almendra"
android:textColor="@color/white">

</androidx.appcompat.widget.AppCompatButton>

<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/new_user_click_here"
android:gravity="center"
android:textColor="@color/black"
android:fontFamily="@font/almendra"
android:textSize="15sp"
android:textStyle="bold"
android:layout_marginBottom="10sp"
/>
</LinearLayout>

</androidx.cardview.widget.CardView>

Output:

You might also like