About absolute positioning in Mobile Px

AX-3.8 provides support for absolute-positioning for widgets in Mobile Px. Absolute positioning is achieved by adding a CanvasPane to your Mobile Px page.

An “absolutely positioned” widget is one whose immediate parent is a CanvasPane. The CanvasPane has the ability to scale to fit different sized displays. Therefore, in a properly configured CanvasPane, every absolutely positioned widget scales proportionately with its CanvasPane parent. For example, shown below is a CanvasPane scaled to three different sizes. As the CanvasPane scales larger or smaller the individual widgets in the pane scale proportionately, maintaining their existing ratios.

Figure 31.   Absolutely positioned widgets in CanvasPane scaled to three different sizes
Image

In contrast, a widget whose immediate parent is a BasicMobilePane or a MobileGridPane is “fluidly positioned”. Fluidly positioned widgets do not scale (maintain proportions), instead the widgets resize to fit the screen. For example, a button widget in a BasicMobilePane stretches wider or narrower to fit its container while the size of the text label on the button does not change.

Figure 32.   Fluidly positioned widget in BasicMobilePane shown in two sizes
Image

CanvasPanes can be included in Mobile Px pages by adding them as child widgets of a MobileGridPane. Setting the CanvasPane's scale mode to Fit Ratio, causes the CanvasPane to adjust automatically, expanding or contracting, to properly fit the width of your mobile device. Also, setting the CanvasPane as the root widget of your Mobile Px page results in the entire page having a fixed width and height.