new LayoutManager()
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.
Members
-
static clientWidth
-
Gives the width for the screen.
-
static height
-
Gives the possible height for a window.
-
static keyboardEnabled :Boolean
-
Record the keyboard is enabled now or not.
-
static width
-
Gives the possible width for a normal window.
Methods
-
static match(width, height) → {Boolean}
-
Match the given size with current layout.
Parameters:
Name Type Description width Number The matched width.
height Number The matched height.
Returns:
BooleanMatches current layout or not.
-
static start() → {LayoutManager}
-
Startup. Adds all event listeners needed.
Returns:
LayoutManagerthis object
Events
-
system-resize
-
Fired when layout needs to be adjusted.