I know this should be simple , but android:scaleType="centerCrop"
doesn't crop Image
I got image 1950 pixels wide and need it to be cropped by parent's width. But android:scaleType="centerCrop"
doesn't crop Image. What do I need to do in layout to show only first 400 pixels, for instance or whatever screen/parent width is
Sorry for simple question - tried to Google it - only complicated questions there. And I'm new, so don't downvote please)
<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>
if there's only way is to programmaticaly crop it - please give me an advice with a method
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…