Android 将俯视图与相对线的中心对齐

Android 将俯视图与相对线的中心对齐,android,xml,view,android-relativelayout,Android,Xml,View,Android Relativelayout,如何设置imageView的布局参数以获得类似的结果 谢谢 我准备了一个简单的黑客解决方案。 转储视图,并为其指定视图顶部 <View android:id="@+id/view1" android:layout_width="match_parent" android:layout_height="0dp" android:layout_centerHorizontal="true" android:layout_centerVertical="t

如何设置imageView的布局参数以获得类似的结果


谢谢

我准备了一个简单的黑客解决方案。 转储
视图
,并为其指定
视图
顶部

<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" />



希望这能帮助您…欢迎任何查询:)

使用布局顶部、底部、右侧和左侧边距进行调整