Positioning UI Elements

Use

In the Mobile Applications for Handhelds perspective, UI elements are arranged on the UI in accordance with the layout you select for a view.

The layout specifies the arrangement of the UI elements in the UIElementContainer . The UIElementContainer can contain any number of UI elements that form the children of the container. You must add an object of type Layout to each container. You must add an appropriate object of the type LayoutData to each child object contained in this container. This LayoutData object specifies the layout properties of the corresponding child in the container, for example, the position in a coordinate system defined by the layout.

Three different layouts are supported for handheld devices.

  • FlowLayout

    A flow layout sequentially arranges UI elements one after the other. This means that you cannot define line breaks for the elements. A flow layout depends on the client technology and the size of the browser window.

  • GridLayout

    A grid layout arranges UI elements in a two-dimensional grid with a specific number of columns and any number of rows. Line breaks are automatically inserted if there is no empty cell in a row to accommodate the UI element.

More Information