![](/img/trans.png)
[英]Align ImageView to center of a TextView in RelativeLayout
[英]Align top imageView with the center of a relativeLayout
如何設置imageView的布局參數以獲得類似的信息?
謝謝!!
我准備了一個簡單的黑客解決方案。 制作轉儲View
並為其分配View
頂部。
<View
android:id="@+id/view1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" />
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/view1"
android:layout_centerHorizontal="true"
android:src="@drawable/ic_launcher" />
希望這可以幫助您...歡迎任何查詢:)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.