Align
What it does
- Align have one child, and it aligns the child based on the optional parameters given.
Builder Parameters
horizontal
(Optional)- How the child component should be aligned horizontally.
- Default: Start (Left)
vertical
(Optional)- How the child component should be aligned vertically.
- Default: Start (Top)
child
- The child component to align.
Space Behaviour
- Minimum
Example
public class TestAlign implements UIComponent {
@Override
public UIComponent build(Layout layout) {
return new Align.Builder()
.withVertical(LayoutSetting.END)
.withHorizontal(LayoutSetting.CENTER)
.build(new Text.Builder("Whats up?"));
}
}