Task 3
Task 3
Code:-
<?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/LoginActivitymain"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".LoginActivity"
android:orientation="vertical"
android:background="@drawable/background">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/logo_of_app"
android:layout_gravity="center_horizontal"
android:layout_marginTop="45dp"
/>
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/CVlogin"
app:cardCornerRadius="28sp"
app:cardBackgroundColor="#80FFFFFF"
app:cardElevation="16sp"
android:layout_marginTop="50dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:id="@+id/CVll"
android:layout_margin="8sp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="casual"
android:text="@string/login_here"
android:gravity="center_horizontal"
android:textColor="@color/Green"
android:textStyle="bold"
android:textSize="24dp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="50dp"
android:id="@+id/ETloginUsername"
android:hint="@string/enter_username"
android:textColorHint="@color/black"
android:textStyle="bold"
android:textSize="16sp"
android:fontFamily="@font/galada"
android:inputType="text"
android:layout_margin="8sp"
android:background="@drawable/etshape"/>
<EditText
android:layout_width="match_parent"
android:layout_height="50dp"
android:id="@+id/ETloginpassword"
android:hint="@string/enter_password"
android:textColorHint="@color/black"
android:background="@drawable/etshape"
android:textStyle="bold"
android:textSize="16sp"
android:fontFamily="@font/galada"
android:inputType="textPassword"
android:layout_margin="8sp"/>
<androidx.appcompat.widget.AppCompatButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/ButtonLogin"
android:text="@string/login"
android:background="@drawable/btshape"
android:layout_gravity="center"
android:textStyle="bold"
android:textSize="16sp"
android:textColor="@color/white"
android:fontFamily="monospace"
android:layout_marginTop="12sp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/TVNewUser"
android:text="@string/new_user_login"
android:textSize="14sp"
android:textColor="@color/DarkBlue"
android:fontFamily="monospace"
android:textStyle="italic"
android:gravity="center"
android:layout_marginBottom="20sp"
android:layout_marginTop="12sp"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/TVSloganr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginBottom="20sp"
android:fontFamily="serif"
android:layout_gravity="right"
android:text="@string/good_food_great_mood"
android:textColor="@color/white"
android:textSize="28sp"
android:textStyle="italic" />
</LinearLayout>
<corners
android:radius="20sp"/>
<solid
android:color="@color/white"/>
</shape>
Button Shape:-
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="2sp"
android:color="@color/black"/>
<corners
android:radius="28sp"/>
<gradient
android:startColor="@color/Blue"
android:endColor="@color/DarkBlue"/>
</shape>
Output:-