I have a recyclerview and i am using constraint layout . Now i want to use height as wrap_content but want to set maximum height in percent .How i can achieve this using constraint layout?
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@+id/search_view"
android:layout_height="0dp"
app:layout_constraintHeight_default="wrap"
app:layout_constraintHeight_max="500dp"
android:scrollbars="vertical"/>