【发布时间】:2013-08-16 01:06:37
【问题描述】:
我知道这应该很简单,但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>
【问题讨论】:
标签: java android imageview crop