[英]Android TextView not aligning below ImageView
<TextView android:text="ABC"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
下面的代碼應該將文本與圖像下方的右下角對齊。 但這並沒有發生
<TextView
android:text="XYZ"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/pic"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"/>
<ImageView
android:src="@drawable/androidparty"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/pic"/>
Android TextView 未在 ImageView 下方對齊
TextView
不低於對齊ImageView
由於alignParentBottom
屬性設置為true
的TextView的。
從 TextView 中刪除alignParentBottom
屬性:
<TextView
....
android:layout_below="@id/pic"
android:layout_alignParentRight="true"/>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.