我正在使用Android的relativelayout,試圖使兩個按鈕並排排列。 但是,當我使用layout_toLeftOf時,我的button02突然消失。 這很好,如果我使用layout_toRightof。有人知道爲什麼使用relativelayout的「toLeftof」時,視圖消失
<Button
android:id="@+id/Button01"
android:layout_alignParentLeft="true"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@+id/Button01">
</Button>
<Button
android:id="@+id/Button02"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@+id/Button02"
android:layout_toLeftOf="@+id/Button01"
android:layout_alignTop="@+id/Button01"
android:layout_alignBottom="@+id/Button01"
>
</Button>
啊哈!我真笨!! – Nohappy 2011-03-06 12:53:04