0% found this document useful (0 votes)
24 views3 pages

Program 1

The document describes an XML code for a visiting card design program. The program uses a linear layout with multiple text views and image views to display the company name, contact person name, job title, phone number, address, and email/website. The layout positions these views with relative and wrap content to display the visiting card information in an organized manner.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views3 pages

Program 1

The document describes an XML code for a visiting card design program. The program uses a linear layout with multiple text views and image views to display the company name, contact person name, job title, phone number, address, and email/website. The layout positions these views with relative and wrap content to display the visiting card information in an organized manner.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1 Program 1: VISITING CARD DESIGN

XML Code:
<?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"
android:orientation="vertical"
tools:context=".MainActivity">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="150dp">

<ImageView
android:id="@+id/imageView"
android:layout_width="178dp"
android:layout_height="107dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_marginStart="236dp"
android:layout_marginTop="34dp"
android:layout_marginEnd="-4dp"
android:layout_marginBottom="9dp"
app:srcCompat="@drawable/img1" />

<TextView
android:id="@+id/textView"
android:layout_width="255dp"
android:layout_height="54dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_marginStart="7dp"
android:layout_marginTop="43dp"
android:layout_marginEnd="149dp"
android:layout_marginBottom="53dp"
android:text="Company name"
android:textAlignment="center"
android:textAllCaps="true"
android:textColor="#FF0000"
android:textSize="30sp" />

</RelativeLayout>

<View
android:id="@+id/view"
android:layout_width="wrap_content"
android:layout_height="10dp"
android:background="@color/black" />

Mobile Application Development – 18CSMP68


2 Program 1: VISITING CARD DESIGN

<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="90dp"
android:text="Name"
android:textAlignment="center"
android:textAllCaps="true"
android:textColor="#FFEB3B"
android:textSize="48sp" />

<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="102dp"
android:text="Job Title"
android:textAlignment="center"
android:textAllCaps="true"
android:textColor="#F44336"
android:textSize="48sp" />

<View
android:id="@+id/view2"
android:layout_width="match_parent"
android:layout_height="10dp"
android:background="@color/black"/>

<TextView
android:id="@+id/textView4"
android:layout_width="match_parent"
android:layout_height="99dp"
android:text="Phone Number"
android:textAlignment="center"
android:textAllCaps="true"
android:textSize="34sp" />

<TextView
android:id="@+id/textView5"
android:layout_width="match_parent"
android:layout_height="98dp"
android:text="Address"
android:textAlignment="center"
android:textAllCaps="true"
android:textColor="#03A9F4"
android:textSize="48sp" />

<TextView
android:id="@+id/textView6"
android:layout_width="match_parent"
android:layout_height="85dp"
android:text="Email, Website"
android:textAlignment="center"
android:textAllCaps="true"
android:textColor="#01D809"
android:textSize="34sp" />
</LinearLayout>

Mobile Application Development – 18CSMP68


3 Program 1: VISITING CARD DESIGN

Output:

Mobile Application Development – 18CSMP68

You might also like