RegistrationForm XML

 


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:id="@+id/h1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Registration Form"
android:textSize="40dp"
android:gravity="center"
android:padding="10dp"
android:fontFamily="sans-serif-black"
android:background="#01D6F1"
android:textColor="@color/black" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/h1"
android:background="#8600BCD4"/>

<EditText
android:id="@+id/ed1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter name"
android:layout_marginTop="30dp"
android:textSize="20dp"
android:layout_below="@+id/h1"
/>
<EditText
android:id="@+id/ed2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter email"
android:layout_marginTop="10dp"
android:textSize="20dp"
android:layout_below="@+id/ed1"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/tv1"
android:text="Gender"
android:layout_below="@+id/ed2"
android:textSize="20dp"
android:layout_marginTop="10dp"/>
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/rd1"
android:layout_below="@+id/tv1"
android:orientation="horizontal">

<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Male"
android:id="@+id/male"
android:padding="10dp"
android:textSize="15dp"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Female"
android:id="@+id/female"
android:padding="10dp"
android:textSize="15dp"
/>
</RadioGroup>

<TextView
android:id="@+id/tv3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Hobby"
android:layout_below="@+id/rd1"
android:textSize="20dp"
android:layout_marginTop="10dp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/ll1"
android:layout_below="@+id/tv3"
android:orientation="horizontal">

<CheckBox
android:id="@+id/cb1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Gaming"
android:padding="10dp"/>
<CheckBox
android:id="@+id/cb2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Football"
android:padding="10dp"/>
<CheckBox
android:id="@+id/cb3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Cricket"
android:padding="10dp"/>
<CheckBox
android:id="@+id/cb4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pool"
android:padding="10dp"/>

</LinearLayout>

<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Submit"
android:textColor="@color/black"
android:id="@+id/btn_submit"
android:layout_below="@+id/ll1"
android:layout_marginTop="30dp"
android:gravity="center"
android:backgroundTint="#01D6F1"
/>

</RelativeLayout>

Comments

Popular posts from this blog

Assesment 1 JAVA