0
模擬器不斷崩潰,當我運行這個如何在相對佈局中嵌套佈局或創建兩個相對佈局?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10px"
android:background="@drawable/words_background">
<ImageView
android:layout_height="wrap_content"
android:id="@+id/imageView1"
android:src="@drawable/logo"
android:paddingTop="5dp"
android:layout_width="wrap_content"
android:layout_alignParentTop="true" />
<TextView
android:layout_height="wrap_content"
android:gravity="right"
android:textSize="20dp"
android:layout_width="wrap_content"
android:id="@+id/lettersQuestion"
android:paddingLeft="5dp"
android:typeface="normal"
android:text="@string/question"
android:textStyle="bold"
android:layout_below="@+id/imageView1"
android:layout_alignRight="@+id/imageView1"></TextView>
<TextView
android:layout_height="wrap_content"
android:gravity="right"
android:textSize="20dp"
android:layout_width="wrap_content"
android:id="@+id/board_lettersQuestion"
android:paddingLeft="5dp"
android:typeface="normal"
android:text="@string/question"
android:textStyle="bold"
android:layout_below="@+id/lettersQuestion"
android:layout_alignLeft="@+id/lettersQuestion"
android:layout_alignRight="@+id/lettersQuestion"
android:paddingTop="20dp"></TextView>
<EditText
android:id="@+id/letters"
android:layout_height="wrap_content"
android:layout_width="280dp"
android:hint="@string/enter_letters"
android:layout_below="@+id/imageView1" />
<EditText
android:id="@+id/board_letters"
android:layout_height="wrap_content"
android:layout_width="280dp"
android:hint="Enter Board Letters"
android:layout_below="@+id/letters" />
<TextView
android:id="@+id/moreText"
android:text="@string/more"
android:layout_alignLeft="@id/board_letters"
android:layout_below="@id/board_letters"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="15dp"
android:typeface="normal"
android:paddingLeft="5dp"
android:textStyle="bold" />
<View
android:background="#eee9e9"
android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_centerVertical="true"
android:layout_below="@id/moreText"
android:paddingTop="3dp" />
<LinearLayout
android:id="@+id/moreContent"
android:visibility="gone">
<EditText
android:layout_below="@+id/moreText"
android:id="@+id/containsText"
android:hint="Contains"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/moreText"
android:layout_alignRight="@+id/moreText"
android:paddingTop="5dp"></EditText>
<Spinner
android:id="@+id/starts_with"
android:entries="@array/alphabet_start"
android:layout_width="155dp"
android:hint="Starts With"
android:layout_height="wrap_content"
android:layout_below="@+id/editText1"
android:layout_alignLeft="@+id/editText1"
android:prompt="@string/starts_with"></Spinner>
<Spinner
android:id="@+id/ends_with"
android:entries="@array/alphabet_end"
android:layout_width="155dp"
android:prompt="@string/ends_with"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/starts_with"
android:layout_alignTop="@+id/starts_with"
android:layout_alignBottom="@+id/starts_with"></Spinner>
<Spinner
android:id="@+id/minSpinner"
android:entries="@array/lengths_min"
android:layout_width="80dp"
android:prompt="@string/min_length"
android:layout_height="wrap_content"
android:layout_below="@id/starts_with"
android:layout_alignLeft="@+id/starts_with"
android:layout_alignRight="@+id/starts_with">
</Spinner>
<Spinner
android:id="@+id/maxSpinner"
android:entries="@array/lengths_max"
android:layout_width="80dp"
android:prompt="@string/max_length"
android:layout_height="wrap_content"
android:layout_below="@id/ends_with"
android:layout_alignLeft="@id/ends_with"
android:layout_alignRight="@id/ends_with"></Spinner>
</LinearLayout>
</RelativeLayout>
,如果我拿出的LinearLayout能有人幫我格式化才能正常運行工作正常。提前致謝。
當我說拿出線性佈局我的意思是隻是標籤不是內容 – 2011-06-05 17:35:51