[英]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.