Spacing & Alignment
Turn a layout’s padding and gap on or off, and align its components, from the layout’s badge.
A layout’s badge has switches for its padding and for the gap between its components, and a button for its alignment. Copilot writes the change to your Java code.
Pad the buttons' layout and center the view
-
Select a layout, here the one around the buttons: click Save and press
←for its parent. The layout’s badge has the Pad and Gap switches, and Alignment. -
Turn Pad on. The layout gets padding around its buttons, and Copilot writes it to ContactView.java.
-
Click beside the form to select the view, which is a vertical layout too. In Alignment, choose to align its components to the center: the title, the form and the buttons move to the middle.