Help Center

Local Navigation

Arrange UI components

You can arrange components on a screen using BlackBerry® API layout managers.

The following four classes extend the Manager class to provide predefined layout managers:

  • VerticalFieldManager
  • HorizontalFieldManager
  • FlowFieldManager
  • DialogFieldManager
  1. Import the following classes:
    • net.rim.device.api.ui.Manager
    • net.rim.device.api.ui.container.HorizontalFieldManager
    • net.rim.device.api.ui.component.ButtonField
  2. Create an instance of a HorizontalFieldManager and
    HorizontalFieldManager _fieldManagerBottom = new HorizontalFieldManager();
  3. Invoke the add() method to add the HorizontalFieldManager to a screen.
    myScreen.add(_fieldManagerBottom);
  4. Create an instance of a ButtonField.
    ButtonField mySubmitButton = new ButtonField("Submit");
  5. Add the ButtonField to the HorizontalFieldManager.
    _fieldManagerBottom.add(mySubmitButton);

Index


Was this information helpful? Send us your comments.