[TIMOB-879] orientationModes not effective on ipad
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:54:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.4.0 |
Components | iOS |
Labels | ipad, orientationmodes |
Reporter | Justin Vincent |
Assignee | bfreedman (at appcelerator) |
Created | 2011-04-15T02:38:26.000+0000 |
Updated | 2011-04-17T01:54:32.000+0000 |
Description
Put this in app.js
Titanium.UI.iPhone.statusBarHidden = true;
var webView = Titanium.UI.createWebView({url:'http://google.com'})">http://google.com'});
var win = Titanium.UI.createWindow({fullscreen: true});
win.orientationModes = [
Titanium.UI.PORTRAIT,
Titanium.UI.UPSIDE_PORTRAIT
];
win.add(webView);
win.open();
I know that there would be no reason to limit orientationModes for displaying google.
However, I am building a two player board game (like chess) in HTML/JavaScript.
The idea is to replicate a real board with both players sitting at each end of the ipad. It doesn't make sense for the board to be an any orientation other than portrait - so ideally I need to be able to lock the orientation to PORTRAIT or UPSIDE_PORTRAIT
Hunting through he docs I see there is a way to do this with win.orientationModes, but it doesn't work in the case outlined above.
I wonder if it may be that Titanium.UI.createWebView also needs orientationModes?
I've tested in the simulator and on an ipad, same issue in both places.
Screen shot attached.
Attachments
File | Date | Size |
---|---|---|
screen-shot-2010-05-04-at-30606-pm.png | 2011-04-15T02:38:27.000+0000 | 485392 |
I'm not sure who the general public should assign tickets to, so I assigned it to Bill Dawson 'cos your name came up a lot!
This also appears to be an issue on Android with the 1.3 Ti SDK.
Note that setting the orientation mode works fine in Ti 1.2, but was broken in 1.3.
Is a fix scheduled for 1.4?
This appears to be a duplicate of a bug that either Blain or I fixed, relating to orientation on the iPad. With the provided test code I was able to get the window to orient only when in one of the portrait-style modes, which seems to be what you want.
If this is still a problem with Android, I'd create a separate ticket for that. They may also have been working on orientation issues, I'm not sure.