Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

orientationchange not detected

Hello all,

I have a table view:

var tableView = Titanium.UI.createTableView({
    top:54,
    bottom:10,
    borderColor:"#333",
    separatorColor:"#333",
    editable:true,
    width:"90%",
    backgroundColor:"#000"
});

and I instruct appcelerator to allow only landscape mode, and listen to orientationchange:

win1.orientationModes = [Titanium.UI.LANDSCAPE_LEFT];
Ti.Gesture.addEventListener('orientationchange',function(e) {        
    Ti.API.info('the orientation changed to  '+e.orientation);
    tableView.width = "90%";
});

but when I start the iphone emulator couple of things doesn't go according to plan:

  1. The simulator doesn't go up as Landscape.
  2. The event is never called, even if I use "Hardware/Rotate Left".

I'm using 1.3.0 SDK

Any ideas?

— asked June 4th 2010 by Yaniv Nagar
  • event
  • iphone
  • orientationchange
0 Comments

0 Answers

The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.