I have 2 buttons that I want to have next to each other, each taking up half the width of the screen (with margins) (i.e. they are the same width no matter what the screen size).
I have the following:
contact.Below(auctioneerView, 10f),
contact.AtLeftOf (this, 10f),
contact.ToLeftOf (report, 10f),
contact.Height().EqualTo(50),
report.Below(auctioneerView, 10f),
report.Height().EqualTo(50),
report.AtRightOf (contact, 10f),
report.WithSameRight(this),
I have tried setting the width using
report.Width().EqualTo(this.Frame.Width - 20f),
But that doesn't work as I suspect that at the time that the constraints are built up, the view
doesn't have a width
yet so it is 0
How can I use FluentLayout
to get these two buttons to share the width of the screen?