FANDOM


One of the most problematic issues developing on a mobile device like Android is the geometry property.

The geometry property is useful to set automatic dimensions and resizing and scaling when your stack is resized, unfortunately on a mobile device this doesn't work!

You can't call revUpdateGeometry either, because it doesn't work at all!

You have to manually create a message in every card that resizes every element in the card or use a Livecode plugin called Native geometry: http://www.nativesoft.net/products/nativegeometry/

For pure graphic applications Livecode now supports the stretch of the screen, where the screen adapts to fit the screen. This screen manipulation deforms all the result, so you can use it for video games, but not for texts. The property is fullscreen:

 set the fullscreenmode of this stack to  "exactFit"

You can choose different full screen stretch types changing this property between:

  • empty (default)
  • "exactFit"
  • "letterbox"
  • "noBorder"
  • "noScale"

When should the card elements geometry be updated?

First of all on opening the card, because every mobile device has a different screen size.

Second of all on rotation, if you permitted it.

Livecode doesn't automatically set rotation. Instead you have to declare which types of orientation you want to allow by using mobileSetAllowedOrientations. For example:

 mobileSetAllowedOrientations    "portrait,portrait upside down,landscape left,landscape right"

On mobile Livecode always expands the stack in order to fill the screen.