2011-07-19 48 views
1

我一直在嘗試創建一個xml文件,它在一個選項卡式佈局中集成了一個相對佈局。這裏是我的代碼: XML文件問題

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

我收到錯誤的衆多和我似乎無法找到我的問題是什麼: 我的錯誤是相對佈局必須遵循的>或/> 和 沒有找到追索給定的名字在機器人比賽:ID =「@ + ID/simpleMode

任何幫助,將不勝感激非常感謝你!

回答

3

請參閱你缺少」 android:id="@+id/simpleMode。所以你的XML之後文件給出了錯誤。只要把它和運行

+0

哇,這是一個非常愚蠢的錯誤。我認爲這與我+ ID標籤或事做。謝謝 – YoKaGe