I would like to know how you adjust the "hitbox" of an ImageView to the Image inside, so that there are no empty spaces around the image. I want to make a game and so it feels odd when you click on an empty space next to the Image but it still counts as "a click on the image". I would really appreciate help. Thank you in advance.
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/soraka"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:src="@drawable/image"
android:adjustViewBounds="true"
android:maxWidth="300dp"
android:maxHeight="300dp"
android:scaleType="fitXY"
android:layout_alignParentEnd="false"
android:layout_alignParentStart="false"
android:cropToPadding="false"
android:padding="0dp" />