Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
210 views4 pages

Practical No. 05

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 4

DEPARTMENT OF COMPUTER ENGINEERING

Subject: Mobile Application Development (MAD) Subject Code: 22617


Semester: 6 Course: CO6IA
Laboratory No: V119 Name of the Subject Teacher: Prof. Prasad Koyande
Name of the Student: Diksha Sunil Jadhav Roll Id: 21203A0057

Experiment No. 05
Title of the experiment Develop a program to implement linear layout and absolute layout.

Practical Related Questions:

1. Name any three-layout manager.

 LinearLayoutManager
 GridLayoutManager
 StaggeredGridLayoutManager
 FrameLayout
 RelativeLayout
 ConstraintLayout
 TableLayout
 FlowLayout
 GridLayout
 CoordinatorLayout
 FlexboxLayout
 PercentRelativeLayout
 AppBarLayout
 DrawerLayout
 ScrollView

2. What is Card view.

 CardView is a new widget in Android that can be used to display any sort of data by
providing a rounded corner layout along with a specific elevation.
 CardView is the view that can display views on top of each other.
 The main usage of CardView is that it helps to give a rich feel and look to the UI design.
 This widget can be easily seen in many different Android Apps.
 CardView can be used for creating items in listview or inside Recycler View.
 The best part about CardView is that it extends Framelayout and it can be displayed on
all platforms of Android.

Diksha Jadhav – 21203A0057 Page No. | 1


Exercise:

1. Write a program to place Name, Age and mobile number linearly (Vertical) on the display
screen using Linear layout.

activity_main.xml:
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat
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"
android:orientation="vertical"
android:layout_gravity="center"
tools:context=".MainActivity">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Name: Diksha Sunil Jadhav"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:textSize="25dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Age:17"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:textSize="25dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Mobile No.: 9456201354"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:textSize="25dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Class: CO6IA"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:textSize="25dp"
/>

</androidx.appcompat.widget.LinearLayoutCompat>

Diksha Jadhav – 21203A0057 Page No. | 2


2. Write a program to place Name, Age and mobile number centrally on the display screen
using Absolute layout.

activity_main.xml:
<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout
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="wrap_content"
android:layout_height="wrap_content"
android:layout_x="49dp"
android:layout_y="211dp"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:text="Name: Diksha Sunil Jadhav"
android:textSize="25dp" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="148dp"
android:layout_y="279dp"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:text="Age: 17"
android:textSize="25dp" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="65dp"
android:layout_y="346dp"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:text="Mobile No.: 9852147563"
android:textSize="25dp" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="125dp"
android:layout_y="413dp"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:text="Class: CO6IA"
android:textSize="25dp" />

</AbsoluteLayout>

Diksha Jadhav – 21203A0057 Page No. | 3


Process related (15M) Product related (10M) Total (25M) Sign of the teacher

Diksha Jadhav – 21203A0057 Page No. | 4

You might also like