2011-07-19 15 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

あなたが不足している参照してくださいいただければ幸いです」あなたのxml。だからandroid:id="@+id/simpleMode後ファイルはエラーを出しています。それを入れて実行してください

+0

うわー、それは本当にばかなエラーだった..私はそれが私の+ IDタグや何かをしなければならなかったと思いました。ありがとうございました – YoKaGe

1

これらのエラーを簡単に見つける最良の方法は、XMLバリデーターを通じてXMLを実行することです。 XMLバリデーターは、XMLに何が間違っているかを正確に伝えます。

私は、一般的に、ここでW3学校のXMLバリデータを使用します。http://www.w3schools.com/xml/xml_validator.asp