這裏是我的代碼layout_above被破壞了嗎?這個簡單的佈局快把我逼瘋了
<TextView
android:id="@+id/BIG"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BIG"
android:textSize="50dp" />
<TextView
android:id="@+id/small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@id/BIG"
android:layout_toRightOf="@id/BIG"
android:text="small"
android:textSize="10dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/small"
android:layout_alignLeft="@id/small"
android:text="small above"
android:textSize="10dp" />
這是我得到的結果(實際截圖)。正如你所看到的,整個文本視圖已經消失。
這就是我想要的結果(上MSPAINT編輯)
我不能使用,因爲自動填充ALIGN_BOTTOM。這裏是什麼樣子,如果我改用align_Baseline(實際截圖)的ALIGN_BOTTOM已經進行的所有其他垂直對齊後,進行
在第三個文本視圖中添加android:layout_toRightOf =「@ id/BIG」 – 2015-03-02 22:11:04
您的父元素是一個'RelativeLayout',對吧? – tachyonflux 2015-03-02 22:11:07
@karaokyo是的。 – user3453281 2015-03-02 22:14:00