Quantcast
Viewing all articles
Browse latest Browse all 8068

Changing between window in Portrait only and window in all orientation

I'm developing an application for ipad and iphone using Titanium. You can navigate between different views. 1st view (the main view where you can go to another views) will be only on portrait mode, the rest of views can be in any orientation.

For this, I use different windows:

var winPortrait = Ti.UI.createWindow({
    orientationModes : [Ti.UI.PORTRAIT],
    fullscreen : false,
    navBarHidden : true,
    backgroundColor : "#00669c",
 
});
 
var appWindow = Titanium.UI.createWindow({
 
    width : Ti.UI.FILL,
    height : Ti.UI.FILL,
    fullscreen : false,
    navBarHidden : true,
    backgroundColor : "#00669c",
    backgroundImage : "Default-Portrait.png",
    orientationModes : [Ti.UI.PORTRAIT, Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT]
});
This works ok. When I open each window, orientation changes works ok.

To explain my problem, I'm going to specify the steps I do to reproduce it.

  • I'm viewing a screen on landscape:
    • I click to go to main view (portrait only) with device in landscape.
    • Main view is shown in portrait mode.
    • I rotate the device to portrait.
    • I go to the view again with device in portrait
    • If I change device orientation, I receive the orientation change event, app detects is landscape mode and draw elements like landscape, but window or view (I don't know) its drawing like portrait, so it doesn't adjust correctly

This doesn't occur on ios 7, but when I've tried with ios 5.1, it happens (I doesn't have a device with ios 6.x to try it).

I'm using Appcelerator 3.1.3.GA.

Do you know how can I solve it or is a SO problem?

Thank you very much

p.d. I'm not able to put images... Can someone explain me how to put it?


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>