YoKaGe
YoKaGe

Reputation: 385

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!!

Upvotes: 1

Views: 95

Answers (2)

zachzurn
zachzurn

Reputation: 2201

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

Upvotes: 1

Rasel
Rasel

Reputation: 15477

Please see you are missing " after android:id="@+id/simpleMode.So your xml file is giving error.Just put it and run

Upvotes: 3

Related Questions