I use ConstraintLayout, Guideline and ImageView together for responsive view. I am getting extra spacing on the top and bottom on ImageView. I tried android: adjustViewBounds and android: scaleType but it didn't work How can I clear it out?
Here is what it looks like:
Here is the code:
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<androidx.constraintlayout.widget.Guideline
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/left_guideline"
app:layout_constraintGuide_percent=".20"
android:orientation="vertical"/>
<androidx.constraintlayout.widget.Guideline
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/right_guideline"
app:layout_constraintGuide_percent=".80"
android:orientation="vertical"/>
<ImageView
android:layout_width="0dp"
android:layout_height="0dp"
android:adjustViewBounds="true"
app:layout_constraintStart_toStartOf="@+id/left_guideline"
app:layout_constraintEnd_toEndOf="@+id/right_guideline"
app:layout_constraintDimensionRatio="w,1:1"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:src="@drawable/logoo" />
</androidx.constraintlayout.widget.ConstraintLayout>


