Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10791] Android: Ti.UI.Window 'orientationchange' event

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 2.1.2
Fix Version/sn/a
ComponentsAndroid
Labelsapi
ReporterBlain Hamon
AssigneeUnknown
Created2012-09-05T18:51:21.000+0000
Updated2018-02-28T20:04:10.000+0000

Description

In Titanium, there exists a Ti.Gesture.orientation property, and a corresponding orientationchange event for when it changes. There also exists (on Android, soon to be on iOS) a Ti.UI.Window.orientation property. Unfortunately, devs still rely on Ti.Gesture for orientationchange events, which does not reflect the window's orientation. This is a new event, which should trigger after a change in the UI's orientation has begun. This event can happen before, during, or after the animation, as long as the window's orientation and dimensions reflect the state that will exist after the animation. The event may or may not fire while the window is offscreen, and may or may not reflect the onscreen window's orientation. It is also possible that the event is for an orientation mode not requested by the end developer (There are edge cases where the OS will cause this to happen). The event should have one property, orientation, that reflects the window's new orientation. It is likely that this is already implemented in Android.

Comments

No comments

JSON Source