Is there any java or attribute function in xml of the imageView
to specify the ratio of the image?
that is, 16:9
, 3:2
, 4:3
etc ...
<ImageView
android:id="@+id/image_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:background="@drawable/about_background_header"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:contentDescription="default desc" />
The original image is in 16:9
format but I would like it if it can be displayed in 3:2
etc ...