Image a ConstraintLayout which includes three vertically stacked items:
@+id/top
@+id/middle1 or @+id/middle2 (one gets View.VISIBLE, one gets View.GONE)
@+id/bottom
The top of @+id/middle1 and @+id/middle2 is constrained to the bottom of @+id/top, no issue here.
The interesting case is @+id/bottom. That shall always be placed below @+id/middle1 or @+id/middle2, depending on which one is visible (the other will get View.GONE). Is there any way to model this in the layout file or do I have to change the top constraint for @+id/bottom while switching between showing @+id/middle1 and @+id/middle2?