Greetings all
Titanium 3.1.2 windows 7 and Mac Android 4.0+ IOS7
This code works great in IOS but will not work in android regardless of what I try.
What I want to do is make a view landscape even when the device is in portrait because of the amount of info that I need to display.
var mainticket = Ti.UI.createView ({ height:"100%", width: "100%", backgroundColor: "white", orientationModes: [Ti.UI.LANDSCAPE_LEFT] }); mainticket.addEventListener('focus', function(e) { mainticket.orientationModes = [Titanium.UI.LANDSCAPE_LEFT]; });I have modded the TIAPP.xml and all that seems to do is lock it into landscape (I don't need the whole app in landscape).
I have also tried this :
// ticket.orientationModes = Ti.UI.LANDSCAPE_LEFT; $.workmaintickview.add(ticket); // Ti.UI.orientation = Ti.UI.LANDSCAPE_LEFT; // // Ti.Gesture.addEventListener('orientationchange', function(e) { // // Ti.UI.orientation = Ti.UI.LANDSCAPE_LEFT; // Titanium.API.info('gesture fire = ' + Ti.Gesture.orientation); // });its commented out while I try different things.
The second part of this is that I need it to switch back to portrait on a button press. Any ideas what I might be doing wrong?
John