I know this should be simple, but android:scaleType="centerCrop" does not android:scaleType="centerCrop" image
I got an image with a width of 1950 pixels and needed to crop it to the width of the parent. But android:scaleType="centerCrop" does not android:scaleType="centerCrop" image. What do I need to do in the layout to show only the first 400 pixels, for example, or any screen / parent width -
Sorry for the simple question - Google tried this - there are only complicated questions. And I'm new, so donβt take a top-down shot)
<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 only a way to programmatically trim it - please give me advice using the method
java android imageview crop
user2234594
source share