I have a ConstraintLayout that's within a NestedScrollView. At the bottom of this ScrollView (which has fillViewport="true") I always want a button. So I set my button to be app:layout_constraintBottom_toBottomOf="parent" and it is correctly fixed to the bottom. However, I have an expandable RecyclerView that covers up the button when expanded, since there are no constraints set between the button and the list. If I add app:layout_constraintTop_toBottomOf="@id/expandableRecyclerView", the button no longer gets covered - however the button is no longer fixed to the bottom of the page, it lays between the unexpanded list and the bottom of the page.
How can I set these two constraints, but tell the button to prefer being constrained to the bottom of the view? Below you can see the image of the button placed in between with the two constraints. I want it to be fixed to the bottom.
Thanks.
