My text view:
Code
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Type here:"
tools:context=".MainActivity" />
then this is my whole code
Code
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Type here:"
tools:context=".MainActivity" />
<EditText
android:id="@+id/editText1"
android:layout_width="warp_content"
android:layout_height="wrap_content"
android:layout_below="@+id/label"
android:layout_marginTop="10dip"
android:ems="10" >
<requestFocus />
</EditText>
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/button1"
android:layout_alignBottom="@+id/button1"
android:layout_marginLeft="17dp"
android:layout_toRightOf="@+id/button1"
android:text="Cancle" />
<EditText
android:id="@+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/label"
android:ems="10" />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/editText2"
android:layout_marginLeft="24dp"
android:layout_marginTop="17dp"
android:layout_toRightOf="@+id/label"
android:text="OK" />
</RelativeLayout>
and the error it says when i try to run my app is
Description Resource Path Location Type
Element type "TextView" must be followed by either attribute specifications, ">" or "/>". activity_main.xml /LinearLayouts/res/layout line 10 Android XML Format Problem
Description Resource Path Location Type
error: Error parsing XML: not well-formed (invalid token) activity_main.xml /LinearLayouts/res/layout line 10 Android AAPT Problem