I have this layout:
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
...
<FrameLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="200dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
</android.support.constraint.ConstraintLayout >
This recyclerview is added to the "id/content" framelayout
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:layout_gravity="bottom"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
app:layoutManager="LinearLayoutManager" />
It has the desirable effect that the recyclerview is placed at the bottom of the screen.
The problem arises when there are many viewholders in the recyclerview. I would like to leave some room at the top to still see the map (200dp margin). I've tried lots of ways and can't seem to find an elegant solution. Essentially what I want is that the recyclerview will wrap_content until that content is too big. If the content is too big, I want the recyclerview to expand to fill the space it can, while leaving 200dp at the top. In iOS this would be possible using a >= 200 constraint. Is this possible on android? How?
