Class: LayoutManager

LayoutManager

new LayoutManager()

LayoutManager gathers all external events which would affect the layout of the windows and redirect the event to AppWindowManager.

LayoutManager gathers all external events which would affect the layout of the windows and redirect the event to AppWindowManager.

The height of the windows would be affected by some global factor:

  • The height of Statusbar.
  • The existence of Software Home Button.
  • The existence of Keyboard.

When the size state of one of them is changed, LayoutManager would send system-resize event.

resize layout flow

Source:
Requires:

Requires

Members

(static) _lastOrientation :String

The orientation we keep each time we encounter resize event.

The orientation we keep each time we encounter resize event.

Type:
  • String
Source:

(static) keyboardEnabled :Boolean

Record the keyboard is enabled now or not.

Record the keyboard is enabled now or not.

Type:
  • Boolean
Source:

Methods

(static) height()

Gives the possible height for a window.

Gives the possible height for a window.

Source:

(static) match(width, height) → {Boolean}

Match the given size with current layout.

Match the given size with current layout.

Parameters:
Name Type Description
width Number

The matched width.

height Number

The matched height.

Source:
Returns:

Matches current layout or not.

Type
Boolean

(static) start() → {LayoutManager}

Startup.

Startup. Adds all event listeners needed.

Source:
Returns:

this object

Type
LayoutManager

(static) width()

Gives the possible width for a normal window.

Gives the possible width for a normal window.

Source:

Events

system-resize

Fired when layout needs to be adjusted.

Fired when layout needs to be adjusted.

Source: