2012-01-20 4 views
0

今は単純なページを作成しています。しかし、最初のテキストビュー以外は何も出ない。グラフィックレイアウトと実行時の奇妙な問題

Graphical layout Image

Emulator Image

私はクリーン>プロジェクトを経由してきれいにしてみました。これは、このXMLでのみ起こったのは奇妙です。他はうまくいくようです。あなたは "match_parent" を持っているので

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="vertical" > 

    <LinearLayout 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     > 
    <TextView 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:text="Background Color: "/> 

    <Spinner 
     android:id="@+id/Spinner" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
     /> 
    </LinearLayout> 

    <LinearLayout 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     >  
    <TextView 

     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:text="Size: "  /> 

    <RadioGroup 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:orientation="vertical" 
     > 
     <RadioButton 
      android:id="@+id/small" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:text="Small" 
      /> 
     <RadioButton 
      android:id="@+id/medium" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:text="Medium" 
      /> 
     <RadioButton 
      android:id="@+id/large" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:text="Large" 
      /> 

    </RadioGroup> 
    </LinearLayout> 

     <Button 
      android:id="@+id/Make_Changes" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:text="Confirm"/> 

</LinearLayout> 
+0

申し訳ありませんが、みんなのLinearLayout親以外のすべてのためのlayout_width = "wrap_content" とlayout_height = "wrap_content"実際にこのような何かをstackoverflowに投稿するのが好きではありませんが、私は本当にアイデアがありません。 – wesdfgfgd

答えて

2

問題はどこにでもある:) てみ長いXMLコードのIについて

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="vertical" > 

    <LinearLayout 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     > 
    <TextView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="Background Color: "/> 

    <Spinner 
     android:id="@+id/Spinner" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
     /> 
    </LinearLayout> 

    <LinearLayout 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     >  
    <TextView 

     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="Size: "  /> 

    <RadioGroup 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:orientation="vertical" 
     > 
     <RadioButton 
      android:id="@+id/small" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="Small" 
      /> 
     <RadioButton 
      android:id="@+id/medium" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="Medium" 
      /> 
     <RadioButton 
      android:id="@+id/large" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="Large" 
      /> 

    </RadioGroup> 
    </LinearLayout> 

     <Button 
      android:id="@+id/Make_Changes" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="Confirm"/> 

</LinearLayout> 
+0

ああ、それは右のderpだよ – wesdfgfgd

+0

うわー、私は亀裂に乗って...... QQ。あまりにも愚かであると感じる。 – wesdfgfgd