PDA

View Full Version : Initial orientation on Android 3 tablet is not detected correctly



mdimitrov
21 Oct 2011, 2:58 AM
Sencha Touch version tested:

1.1.1

Platform tested against:

Android 3.0.1
Description:

When application starts the initial orientation on Android 3 tablet is detected incorrectly.
Test Case:

Debugging already done:

Ext.EventManager.onDocumentReady function uses Ext.Element.getOrientation() to set Ext.orientation property. Ext.Element.getOrientation() doesn't account Android tablet difference in default orientation.
Possible fix:

use Ext.Viewport.getOrientation()
workaround Ext.Element.getOrientation = Ext.util.Functions.createDelegate(Ext.Viewport.getOrientation, Ext.Viewport);