I am trying out the new Barrier feature in the 1.1.0-beta1. It works as expected however there is this use-case I cant seem to figure or (or is possible ConstraintLayout at
@Cheticamp 's answer is great, but he doesn't explain how he came up that idea.
Here is how I came up another solution inspired by his solution.
What we want to achieve is to put the button as high as possible, but it should be constrained to two limits:
button.bottom >= image.bottom
button.top >= text.bottom
We can use Barrier
to satisfy these two requirements, but we need to modify one of them, I choose to modify the second one:
button.top >= text.bottom <=> button.bottom >= text.bottom + button.height
Now we have these two constraints:
button.bottom >= image.bottom
button.bottom >= text.bottom + button.height
Now we can place a fake button below the TextView
like this: