ANDROID FINAL.pdf


Preview of PDF document android-final.pdf

Page 12373

Text preview


SOURCE CODE:
content_main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.example.sel_45.ex1_8.MainActivity"
tools:showIn="@layout/activity_main">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Name:"
android:id="@+id/name_id"
android:layout_alignBaseline="@+id/editText"
android:layout_alignBottom="@+id/editText"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/to"
android:id="@+id/editText2"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text="Please enter name"
android:ems="10"
android:id="@+id/editText"
android:layout_below="@+id/editText2"
android:layout_toLeftOf="@+id/editText2"
android:layout_toStartOf="@+id/editText2" />
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="DOB:"
android:layout_below="@+id/editText"