Practical No 10
Practical No 10
Controls.
Q1.Program:
<?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:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="WordPress Website"
android:textColor="@color/black"
android:textSize="32dp/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Login"
android:id="@+id/loginText"
android:textSize="36sp"
android:textColor="@color/purple"/>
<EditText
android:layout_width="match_parent"
android:layout_height="50dp"
android:id="@+id/username"
android:background="@drawable/custom_edittext"
android:drawablePadding="8dp"
android:hint="Username"
android:textSize="10sp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="50dp"
android:id="@+id/password""
android:hint="Password""/>
<Button
android:layout_width="match_parent"
android:layout_height="60dp"
android:id="@+id/loginButton"
android:text="Submit"
android:textSize="18sp"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
Q2.
Program:
<?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:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Karmaveer Bhaurao Patil Polytechnic Satara "
android:textColor="@color/black"
android:textSize="32dp/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Student Login"
android:id="@+id/loginText"
android:textSize="36sp"
android:textColor="@color/purple"/>
<EditText
android:layout_width="match_parent"
android:layout_height="50dp"
android:id="@+id/username"
android:background="@drawable/custom_edittext"
android:drawablePadding="8dp"
android:hint="Username"
android:textSize="10sp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="50dp"
android:id="@+id/password""
android:hint="Password""/>
<Button
android:layout_width="match_parent"
android:layout_height="60dp"
android:id="@+id/loginButton"
android:text="Submit"
android:textSize="18sp"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
Outputs: