When we have a recyclerView with images i want to have the image (from which i dont know the dimentions of it) to have a max width and a max height as a percentage of the screen
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/img_rcv_msg_image"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintEnd_toStartOf="@+id/img_guideline2"
app:layout_constraintHorizontal_bias="0.0"
android:scaleType="centerInside"
android:background="@drawable/image_received_placeholder"
app:layout_constraintStart_toStartOf="@+id/guideline6"
app:layout_constraintTop_toBottomOf="parent"
app:srcCompat="@android:drawable/ic_menu_report_image"
tools:ignore="ContentDescription" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/img_guideline2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.75" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="8dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
So i have constrainted the width to be between the two guidelines on the horizontal direction. How can i do this in the vertical also?