Write a program to place Name, Age and mobile number linearly (Vertical) on the display screen using Linear layout.
*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"
android:orientation="vertical">
<TextView
android: id="@+id/t1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="NAME: Sumeet Mandhre"
android:textSize="25sp"
android:textStyle="bold"
android: padding="20dp"/>
<TextView
android: id="@+id/t2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AGE: 19"
android:textSize="25sp"
android:textStyle="bold"
android: padding="20dp"/>
<TextView
android: id="@+id/t3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="MOBILE NO.: 86*****32"
android:textSize="25sp"
android:textStyle="bold"
android: padding="20dp"/>
</LinearLayout>
OUTPUT:
Comments
Post a Comment