相对布局显示的问题..求指导求教育...
如题, 麻烦大家看看小弟下面这个布局哪里不对,,怎么就只能显示Button1和Button2呢?
relativelayout 布局
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
??? android:layout_width="fill_parent"
??? android:layout_height="fill_parent"
??? android:gravity="center"
?????>
??? <Button android:id="@+id/button1"
???? ???android:layout_width="wrap_content"
???? ???android:layout_height="wrap_content"
??? ? ? ? ? android:text="button1"
???? ???/>
??? ?
??? <Button android:id="@+id/button2"
???? ???android:layout_width="wrap_content"
???? ???android:layout_height="wrap_content"
???? ???android:text="button2"
???? ???android:layout_toRightOf="@id/button1"
???? ???android:layout_below="@id/button1"
???? ???/>
??? ?
??? <Button android:id="@+id/button3"
???? ???android:layout_width="wrap_content"
???? ???android:layout_height="wrap_content"
???? ???android:text="button3"
???? ???android:layout_toRightOf="@id/button1"
???? ???android:layout_above="@id/button1"
???? ???/>
??? ?
??? <Button android:id="@+id/button4"
???? ???android:layout_width="wrap_content"
???? ???android:layout_height="wrap_content"
???? ???android:text="button4"
???? ???android:layout_toLeftOf="@id/button1"
???? ???android:layout_below="@id/button1"
???? ???/>
??? ?
??? ?
??? <Button android:id="@+id/button5"
???? ???android:layout_width="wrap_content"
???? ???android:layout_height="wrap_content"
???? ???android:text="button5"
???? ???android:layout_toLeftOf="@id/button1"
???? ???android:layout_above="@id/button1"
???? ???/>
</RelativeLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="button1" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/button1"
android:layout_toRightOf="@id/button1"
android:text="button2" />
<Button
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/button1"
android:layout_toRightOf="@id/button1"
android:text="button3" />
<Button
android:id="@+id/button4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/button1"
android:layout_toLeftOf="@id/button1"
android:text="button4" />
<Button
android:id="@+id/button5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/button1"
android:layout_toLeftOf="@id/button1"
android:text="button5" />
</RelativeLayout>