我知道这应该很简单,但是
我有一张1950像素宽的图片,需要通过父元素的宽度进行裁剪。但是
对于这个简单的问题,抱歉打扰了 - 尝试过谷歌搜索,只有复杂的问题。而且我是新手,请不要给我点踩)
android:scaleType="centerCrop"
不能裁剪图像。我有一张1950像素宽的图片,需要通过父元素的宽度进行裁剪。但是
android:scaleType="centerCrop"
不能裁剪图像。我需要在布局中做什么才能只显示前面的400像素,或者任何屏幕/父元素的宽度。对于这个简单的问题,抱歉打扰了 - 尝试过谷歌搜索,只有复杂的问题。而且我是新手,请不要给我点踩)
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rl1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background_color">
<ImageView
android:id="@+id/ver_bottompanelprayer"
android:layout_width="match_parent"
android:layout_height="227px"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:scaleType="matrix"
android:background="@drawable/ver_bottom_panel_tiled_long" />
</RelativeLayout>