0% found this document useful (0 votes)
6 views

Exp 10

Practical

Uploaded by

ansarisadeem8879
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)
6 views

Exp 10

Practical

Uploaded by

ansarisadeem8879
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/ 4

Name: Midhat Ansari Roll no: 210403

Sub: Mobile Application Development (MAD) Branch: CO


Experiment No. 10: Develop program to implement login window using
above UI controls
1. Write a Program to create a Login form for a social networking site. And do
validation.

CODE:
XML:
<?xml version="1.0" android:layout_height="wrap_cont
encoding="utf-8"?> ent"
<LinearLayout android:layout_marginLeft="20dp"
xmlns:android="http://schemas.and
roid.com/apk/res/android" android:layout_marginTop="80dp"
android:layout_width="match_pare android:layout_marginRight="20d
nt" p"
android:layout_height="match_par android:hint="Username or Email"
ent" android:inputType="textEmailAdd
android:orientation="vertical"> ress" />
<EditText
<ImageView android:id="@+id/et2"
android:layout_width="match_pare
android:layout_width="100dp" nt"
android:layout_height="120dp" android:layout_height="wrap_cont
android:layout_gravity="center" ent"
android:layout_marginLeft="20dp"
android:layout_marginTop="80dp" android:layout_marginTop="10dp"
android:layout_marginRight="20d
android:src="@drawable/fb" /> p"
<EditText android:backgroundTint="#000000
android:id="@+id/et1" "
android:layout_width="match_pare android:hint="Password"
nt"
android:inputType="textPassword" android:orientation="vertical">
/>
<Button <TextView
android:id="@+id/btnLogin" android:id="@+id/txtSignUp"
android:layout_width="wrap_conte
android:layout_width="match_pare nt"
nt" android:layout_height="wrap_cont
android:layout_height="50dp" ent"
android:layout_gravity="center_ho
android:layout_marginLeft="20dp" rizontal"
android:layout_marginTop="35dp" android:text="Sign Up
android:layout_marginRight="20d for Facebook"
p" android:textColor="#000000" />

android:backgroundTint="#000000 <TextView
" android:id="@+id/txtForgotPassw
android:text="Log In" ord"
android:textSize="16sp" android:layout_width="wrap_conte
/> nt"
android:layout_height="wrap_cont
<RelativeLayout ent"
android:layout_width="match_pare android:layout_gravity="center_ho
nt" rizontal"
android:layout_height="match_par android:layout_marginTop="15dp"
ent"> android:layout_marginBottom="15
<LinearLayout dp"
android:layout_width="match_pare android:text="Forgot Password?"
nt" android:textColor="#000000" />
android:layout_height="wrap_cont </LinearLayout>
ent" </RelativeLayout>
android:layout_alignParentBottom </LinearLayout>
="true"

OUTPUT:
2. Write a Program to create a Login form for student registration system.
CODE:
<?xml version="1.0" android:hint="Enter your
encoding="utf-8"?> name"
<RelativeLayout
xmlns:android="http://schemas.and android:layout_toRightOf="@+id/t
roid.com/apk/res/android" 2"

xmlns:app="http://schemas.android android:layout_alignBaseline="@i
.com/apk/res-auto" d/t2"

xmlns:tools="http://schemas.androi android:layout_below="@id/t1"/>
d.com/tools"
<TextView
android:layout_width="match_pare android:id="@+id/t3"
nt"
android:layout_width="wrap_conte
android:layout_height="match_par nt"
ent"
tools:context=".exp10_2"> android:layout_height="wrap_cont
<TextView ent"
android:id="@+id/t1" android:text="Mobile No: "
android:textSize="26dp"
android:layout_width="match_pare
nt" android:layout_below="@id/t2"/>
<EditText
android:layout_height="wrap_cont android:id="@+id/e2"
ent" android:layout_width="wrap_conte
android:text="Student nt"
Registration Form" android:layout_height="wrap_cont
android:textSize="32dp" ent"
android:gravity="center" android:inputType="number"
android:layout_marginTop="30dp" android:hint="Enter your
/> phone no"
<TextView android:layout_toRightOf="@+id/t
android:layout_marginTop="30dp" 3"
android:id="@+id/t2"
android:layout_width="wrap_conte android:layout_alignBaseline="@i
nt" d/t3"
android:layout_height="wrap_cont
ent" android:layout_below="@id/e1"/>
android:text="Name: " <TextView
android:textSize="26dp" android:id="@+id/t4"
android:layout_below="@id/t1"/>
<EditText android:layout_width="wrap_conte
android:id="@+id/e1" nt"
android:layout_width="wrap_conte
nt" android:layout_height="wrap_cont
android:layout_height="wrap_cont ent"
ent" android:text="Age: "
android:textSize="26dp" nt"
android:layout_below="@id/t3"/>
<EditText android:layout_height="wrap_cont
android:id="@+id/e3" ent"
android:layout_width="wrap_conte android:text="Male"
nt" android:textSize="24dp"/>
android:layout_height="wrap_cont <RadioButton
ent" android:layout_width="wrap_conte
android:inputType="number" nt"
android:hint="Enter your age" android:layout_height="wrap_cont
android:layout_toRightOf="@+id/t ent"
4" android:text="Female"
android:layout_alignBaseline="@i android:textSize="24dp"/>
d/t4" </RadioGroup>
android:layout_below="@id/e2"/> <Button
<RadioGroup android:layout_width="150dp"
android:id="@+id/rd" android:layout_height="wrap_cont
android:layout_width="wrap_conte ent"
nt" android:layout_below="@id/rd"
android:layout_height="wrap_cont
ent" android:layout_marginLeft="90dp"
android:layout_centerVertical="tru android:text="Submit"
e"> android:backgroundTint="@color/
<RadioButton black"/>
android:layout_width="wrap_conte </RelativeLayout>

OUTPUT:

You might also like