我有一个带有 2 个图像的内部相对布局,当我设置 android:layout_marginRight 属性时,它什么也不做。
这是我的代码:
<RelativeLayout
android:id="@+id/location_image_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="80dp" />
<ImageView
android:layout_width="69.33dp"
android:layout_height="72dp"
android:background="@drawable/icon"
android:layout_centerInParent="true" />
</RelativeLayout>