-1
我需要设置图像靠近左侧的元素。要做到这一点的唯一方法是通过编辑图像来消除所有边距?如果我需要它更接近?Android XML ImageView marginLeft属性
marginLeft是否接受负值?
这是ImageView的是如何在XML文件:
<ImageView
android:id="@+id/lineOneImageView"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerVertical="false"
android:layout_marginLeft="-6"
android:layout_toRightOf="@id/productNameTextView"
android:contentDescription="@string/text_placeholder"
android:scaleType="fitXY"
android:src="@drawable/img_i_black_normal" />
这是在这一行错误:机器人:layout_marginLeft = “ - 6”
Error: Integer types not allowed (at 'layout_marginLeft' with value '-6').