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

Visiting Card Design Application

The document describes creating an Android application to design a visiting card layout. The layout will include a company logo in the top right corner, centered company name in capital letters, and information like name, job title, phone number, address, email, fax, and website address. It provides the XML code for the relative layout containing TextViews and an ImageView to display this information.

Uploaded by

bobbudigere
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)
259 views3 pages

Visiting Card Design Application

The document describes creating an Android application to design a visiting card layout. The layout will include a company logo in the top right corner, centered company name in capital letters, and information like name, job title, phone number, address, email, fax, and website address. It provides the XML code for the relative layout containing TextViews and an ImageView to display this information.

Uploaded by

bobbudigere
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

Program-1

Objective-
Create an application to design aVisiting Card. The Visiting card should havea companylogoatthe
top right corner. The company name should be displayed in Capital letters, aligned to the center.
Information like the name of the employee, job title, phone number, address, email, fax and the
website address isto be displayed. Insert a horizontal line between the job title and the phone
numberactivity_main.xml file code

cttivity_main.xml file code


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="[Link]
xmlns:app="[Link]
xmlns:tools="[Link]
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
android:layout_margin="17dp"
android:layout_marginStart="17dp"
android:layout_marginLeft="17dp"
android:layout_marginTop="17dp"
android:layout_marginBottom="17dp"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="RGIT"
android:textStyle="bold" />
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginTop="-14dp"
android:layout_marginEnd="-14dp"
android:layout_marginRight="-14dp"
android:layout_marginBottom="481dp"
android:maxWidth="187dp"
android:maxHeight="231dp"
app:srcCompat="@drawable/sneha_photo" />
<View
android:id="@+id/view"
android:layout_width="wrap_content"
android:layout_height="4dp"
android:layout_alignParentBottom="true"
android:layout_marginBottom="466dp"
android:background="#44171717"
/>
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginEnd="117dp"
android:layout_marginRight="117dp"
android:layout_marginBottom="394dp"
android:text="Pushplata Dubey"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginTop="200dp"
android:layout_marginEnd="100dp"
android:layout_marginRight="100dp"
android:layout_marginBottom="350dp"
android:text="Assistant Professor CSE" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginTop="250dp"
android:layout_marginEnd="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="300dp"
android:text="RGC csmpus Anand Nagar Hebbal bangalore" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginTop="280dp"
android:layout_marginEnd="80dp"
android:layout_marginRight="80dp"
android:layout_marginBottom="250dp"
android:text="E[Link] />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginTop="350dp"
android:layout_marginEnd="100dp"
android:layout_marginRight="100dp"
android:layout_marginBottom="200dp"
android:text="Phone no:2222222" />
</RelativeLayout>

[Link] file code // default code is there no change


package [Link].sneha_vistingcard;
import [Link];
import [Link];
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
setContentView([Link].activity_main);
}
}
output

You might also like