Image View not Wrapping Contents
Add the following fields to ImageView:
android:scaleType="fitXY"
android:adjustViewBounds="true"
To display original image size in Imageview write down following.
android:layout_height="wrap_content"
and android:adjustViewBounds="true"
do the job. No need to set ScaleType.
<ImageView
android:id="@+id/iv_QuestionImage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:adjustViewBounds="true"
android:src="@drawable/ic_app_icon_512"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />