1
[編輯]避免與Android重疊:layout_centerVertical =在RelativeLayout的
「真」 鑑於:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/text1"
android:layout_width="match_parent"
android:layout_height="200dip"
android:background="#ff00ff00" />
<TextView
android:id="@+id/text2"
android:layout_width="match_parent"
android:layout_height="200dip"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:background="#ffff0000" />
</RelativeLayout>
我怎樣才能避免在小屏幕上文本1和文本之間的重疊。重要提示:
如果可能的話,沒有重疊,文本2,應準確地在屏幕的垂直中心顯示
是否有重疊,文本2應該向下移動了一下,text1的
下面直接顯示
謝謝,但這裏的button_container是在剩餘空間的中間,而不是在屏幕的中間。我需要它在屏幕中間(如果有足夠的空間可用)。 – 2012-03-07 09:15:01
你已經改變了整個問題,所有嘗試的答案現在已經脫離了語境。請把它作爲一個單獨的問題提出。 – Akhil 2012-03-07 12:36:41