应该很简单。
当我调用
我想知道ImageView是否具有“center” scaleType会影响它,但根据文档:“将图像居中显示在视图中,但不执行缩放。” 这是源代码:
当我调用
image.getDrawable().getIntrinsicWidth()
时,返回的值比源图像宽度大。它的X坐标返回的是2880而不是1920,这是1.5倍太大了?我想知道ImageView是否具有“center” scaleType会影响它,但根据文档:“将图像居中显示在视图中,但不执行缩放。” 这是源代码:
<ImageView
android:id="@+id/backgroundImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/background"
android:scaleType="center"/>
ImageView
中使用了wrap_content
吗? - MacarseImageView
的高度和宽度都设置为wrap_content
。 - Graeme