8

Equivalent of ImageView scaleType 'centerCrop' to bitmap drawable gravity

view full story
linux-howto

http://stackoverflow.com – I have created an activity with a header image. This header image is originally created int the Activity's layout xml using an ImageView where the scaleType is set to centerCrop. This does what I want, it centers the image, clipping it left and right in portrait mode, showing all in landscape mode. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingTop="30dp" android:paddingBottom="6dp" android:paddingLeft="6dp" (HowTos)