Permalink
Browse files

Replace DIRECTION_PORTRAIT to DIRECTION_NORTH since some phones shows…

… the first as native landscape
  • Loading branch information...
1 parent bd49e27 commit 894ee8dbdb5fc2959182f37bf9d6f6d66641174c Sergey Golod committed Feb 7, 2012
Showing with 14 additions and 14 deletions.
  1. +14 −14 framework/src/blackberry/web/widget/Widget.java
View
28 framework/src/blackberry/web/widget/Widget.java
@@ -53,18 +53,18 @@ public Widget( WidgetConfig wConfig, String locationURI ) {
initialize();
_locationURI = locationURI;
- // Set our orientation
- WidgetConfigImpl configImpl = (WidgetConfigImpl) _wConfig;
- if (configImpl.isOrientationDefined()) {
- int direction;
- if (configImpl.getOrientation() == 0) {
- direction = net.rim.device.api.system.Display.DIRECTION_PORTRAIT;
- } else {
- direction = net.rim.device.api.system.Display.DIRECTION_LANDSCAPE;
- }
- net.rim.device.api.ui.Ui.getUiEngineInstance().setAcceptableDirections(direction);
- }
-
+ // Set our orientation
+ WidgetConfigImpl configImpl = (WidgetConfigImpl) _wConfig;
+ if( configImpl.isOrientationDefined() ) {
+ int direction;
+ if( configImpl.getOrientation() == 0 ) {
+ direction = net.rim.device.api.system.Display.DIRECTION_NORTH;
+ } else {
+ direction = net.rim.device.api.system.Display.DIRECTION_LANDSCAPE;
+ }
+ net.rim.device.api.ui.Ui.getUiEngineInstance().setAcceptableDirections( direction );
+ }
+
// Create PageManager
PageManager pageManager = new PageManager( this, (WidgetConfigImpl) _wConfig );
@@ -143,9 +143,9 @@ public static void main( String[] args ) {
waitForStartupComplete();
}
Widget widget = makeWidget( args, wConfig );
-
+
widget.enterEventDispatcher();
-
+
MemoryMaid mm = MemoryMaid.getInstance();
if( mm != null ) {
mm.stop();

0 comments on commit 894ee8d

Please sign in to comment.