Skip to content

Instantly share code, notes, and snippets.

@AsheeshSharma
Last active April 1, 2022 09:11
Show Gist options
  • Save AsheeshSharma/f0022fa4dc0a3f07e99b569d9d69f059 to your computer and use it in GitHub Desktop.
Save AsheeshSharma/f0022fa4dc0a3f07e99b569d9d69f059 to your computer and use it in GitHub Desktop.
Custom aspect ratio with fixed height
<AppCompatImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="@dimen/size_12"
android:adjustViewBounds="true"
android:scaleType="fitXY"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment