XML file problems
i have been trying to create an xml file that integrates a relative layout within the a tabbed layout. Here is my code:
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp" />
<RelativeLayout
android:id="@+id/simpleMode
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</RelativeLayout>
</LinearLayout>
</TabHost>
I开发者_如何学运维 am receiving a multitude of errors and i can't seem to find what my problem is: My errors are Relative Layout must be followed by > or /> and No recourse found that matches the given name at android:id="@+id/simpleMode
Any help would be appreciated Thank You Very Much!!
Please see you are missing " after android:id="@+id/simpleMode
.So your xml file is giving error.Just put it and run
The best way to find these errors easily is to run the XML through an XML validator. The XML validator will tell you exactly whats wrong with your XML.
I generally use W3 Schools XML validator here: http://www.w3schools.com/xml/xml_validator.asp
精彩评论