Titanium.Gesture

Submodule of Titanium.
Platform Since
Android 0.8
iPhone 0.8
iPad 0.8
Mobile Web 0.8

Summary

The top level Gestures module. The Gesture module is responsible for high level device gestures that are device-wide.

Methods

Name Summary
addEventListener

Adds the specified callback as an event listener for the named event.

fireEvent

Fires a synthesized event to any registered listeners.

removeEventListener

Removes the specified callback as an event listener for the named event.

Properties

Name Type Summary
landscape Boolean

True if current window is considered landscape by the device, false otherwise (Android, iPhone, iPad only.) read-only

orientation Number

Orientation of the current window. Value will be one of the following - Titanium.UI.PORTRAIT, Titanium.UI.UPSIDE_PORTRAIT, Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT or Titanium.UI.UNKNOWN (Android, iPhone, iPad only.) read-only

portrait Boolean

True if current window is considered portrait by the device, false otherwise (Android, iPhone, iPad only.) read-only

Events

Name Summary
orientationchange

fired when the device orientation changes

shake

fired when the device is shaken