Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Practical no.

-06
Title: Develop a program to implement frame layout,table and relative layout.
Roll No.:15 Batch- A Date of Performance: 25/01/2024

1) Table Layout
android:layout_height="wrap_content"
<?xml version="1.0" encoding="utf-8"?> android:background="@color/green
<LinearLayout >
xmlns:android="http://schemas.android.co <TextView
m/apk/res/android" android:layout_width="10dp"
xmlns:app="http://schemas.android.com/ap
k/res-auto" android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/t android:text="Enrollment No."
ools" android:textAlignment="center"
android:layout_width="match_parent"
android:layout_height="match_parent" android:textColor="@color/black"
tools:context=".MainActivity" android:textSize="18dp"
android:orientation="vertical">
<LinearLayout android:textStyle="bold"></TextView>
android:layout_width="match_parent" <TextView

android:layout_height="wrap_content" android:layout_width="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"> android:layout_height="wrap_content"
android:text="Name"
<ImageView android:textAlignment="center"
android:textStyle="bold"
android:layout_width="wrap_content" android:textColor="@color/black"
android:layout_height="166dp" android:textSize="18dp">
android:layout_marginTop="10dp" </TextView>
android:src="@drawable/kkw" /> <TextView

<TextView android:layout_width="wrap_content"

android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_height="91dp" android:text="Class"
android:layout_marginTop="8dp" android:textAlignment="center"
android:text="Department of android:textStyle="bold"
Computer Technology"
android:textAlignment="center" android:textColor="@color/black"
android:textColor="#FF0000" android:textSize="18dp">
android:textSize="25sp" </TextView>
android:textStyle="bold" />
</LinearLayout> <TextView
<TableLayout android:layout_width="48dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="wrap_content"> android:text="Percentage"
<TableRow
android:textColor="@color/black"
android:id="@+id/firstrow" android:textSize="18dp"

android:layout_width="wrap_content" android:textStyle="bold"></TextView>
</TableRow>
<TableRow

android:id="@+id/secondrow"
<TableRow
android:layout_width="wrap_content"
android:id="@+id/thirdrow"
android:layout_height="wrap_content"
> android:layout_width="wrap_content"
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content" >
<TextView
android:layout_height="wrap_content"
android:paddingRight="5dp" android:layout_width="wrap_content"
android:text="2100780088"
android:layout_height="wrap_content"
android:textColor="@color/black" android:paddingRight="5dp"
android:textSize="15dp"> android:text="2100780079"
</TextView>
android:textColor="@color/black"
android:textSize="15dp">
<TextView </TextView>

android:layout_width="wrap_content"
<TextView
android:layout_height="wrap_content"
android:paddingRight="5dp" android:layout_width="wrap_content"
android:text="Gade Prasad
Vijay" android:layout_height="wrap_content"
android:paddingRight="5dp"
android:textColor="@color/black" android:text="Bhadane Aditya
android:textSize="15dp"> Nitin"
</TextView>
android:textColor="@color/black"
<TextView android:textSize="15dp">
</TextView>
android:layout_width="wrap_content"
<TextView
android:layout_height="wrap_content"
android:text="TYCM-Lin" android:layout_width="wrap_content"
android:paddingRight="5dp"
android:textAlignment="center" android:layout_height="wrap_content"
android:text="TYCM-Lin"
android:textColor="@color/black" android:paddingRight="5dp"
android:textSize="15dp"> android:textAlignment="center"
</TextView>
<TextView android:textColor="@color/black"
android:textSize="15dp">
android:layout_width="wrap_content" </TextView>
<TextView
android:layout_height="wrap_content"
android:text="96.00%" android:layout_width="wrap_content"
android:paddingRight="5dp"
android:layout_height="wrap_content"
android:textColor="@color/black" android:text="93.33%"
android:textSize="15dp"> android:paddingRight="5dp"
</TextView>
</TableRow> android:textColor="@color/black"
android:textSize="15dp">
</TextView> android:text="93.11%"
</TableRow> android:paddingRight="5dp"
<TableRow
android:textColor="@color/black"
android:id="@+id/forthrow" android:textSize="15dp">
</TextView>
android:layout_width="wrap_content" </TableRow>
</TableLayout>
android:layout_height="wrap_content" </LinearLayout>
>
<TextView

android:layout_width="wrap_content"

android:layout_height="wrap_content"
android:paddingRight="5dp"
android:text="2100780086"

android:textColor="@color/black"
android:textSize="15dp">
</TextView>

<TextView

android:layout_width="wrap_content"

android:layout_height="wrap_content"
android:paddingRight="5dp"
android:text="Dhakane Aditya
Arun"

android:textColor="@color/black"
android:textSize="15dp">
</TextView>

<TextView

android:layout_width="wrap_content"

android:layout_height="wrap_content"
android:text="TYCM-Lin"
android:paddingRight="5dp"
android:textAlignment="center"

android:textColor="@color/black"
android:textSize="15dp">
</TextView>
<TextView
2) Relative Layout
android:layout_width="wrap_content"
<?xml version="1.0" encoding="utf-
android:layout_height="wrap_content" 8"?>
<androidx.constraintlayout.widget.Con
straintLayout android:layout_toLeftOf="@id/imageV
xmlns:android="http://schemas.android iew"
.com/apk/res/android"
android:text="West"></Button>
xmlns:app="http://schemas.android.co
m/apk/res-auto" <Button

xmlns:tools="http://schemas.android.co android:layout_width="wrap_content"
m/tools"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_below="@id/imageVie
android:layout_height="match_parent" w"
tools:context=".MainActivity">
<RelativeLayout android:layout_centerHorizontal="true
"
android:layout_width="match_parent"
android:layout_marginLeft="5dp"
android:layout_height="match_parent" android:text="South"
>
tools:ignore="DuplicateClickableBoun
<ImageView dsCheck"></Button>
android:id="@+id/imageView" <Button
android:layout_width="172dp"
android:layout_height="291dp" android:layout_width="wrap_content"

android:layout_centerInParent="true" android:layout_height="wrap_content"

app:srcCompat="@drawable/dir" /> android:layout_centerHorizontal="true


"
<Button
android:layout_marginLeft="5dp"
android:layout_width="wrap_content"
android:layout_below="@id/imageVie
android:layout_height="wrap_content" w"

android:layout_centerVertical="true" android:text="South"></Button>
<Button
android:layout_marginLeft="5dp"
android:layout_width="wrap_content"
android:layout_toRightOf="@id/image
View" android:layout_height="wrap_content"
android:text="East"></Button>
<Button android:layout_centerHorizontal="true
"
android:layout_width="wrap_content"
android:layout_marginLeft="5dp"
android:layout_height="wrap_content"
android:layout_above="@id/imageVie
w"

android:layout_centerVertical="true" android:text="North"></Button>
</RelativeLayout>
android:layout_marginLeft="5dp"
</
androidx.constraintlayout.widget.Const
raintLayout>

You might also like