I’m designing a simple layout for my android application but when i write the code below in the xml file of my activity II receive a runtime exception,I mean”Unfortunately [My Project Name] has stopped”.would you please guide me through this?
thanks a lot
here is my code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<Textview
android:id="@+id/txtFName"
android:text="FirstName"
android:layout_width="70dp"
android:layout_height="45dp"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:background="#E6CDFE"
/>
<EditText
android:id="@+id/lblFName"
android:hint="Please Enter Your FirstName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"/>
</RelativeLayout>
Use this :
This will work perfectly for you.
Hope this helps you.
Thanks.