percentWidth set to
100.0 for the middle container seems reasonable to me.
If I update
AnchorLayout to support anchoring to the edges of other children in the parent container, that could be an option too. However, the code to support that feature is actually pretty complex, and performance would be worse, so I think that
HorizontalLayout is the better choice here.
mThisLayout.horizontalAlign = HorizontalAlign.JUSTIFY
It's worth mentioning that
HorizontalAlign.JUSTIFY is not supported by
HorizontalLayout. It doesn't hurt to keep it there, but it just behaves like