05-19-2011 01:50 PM
Hi All,
I know the screen orientation topic has been gone through many times already, but i've searched and searched in the webworks thread for an answer and can't find it.
My app is made for landscape. I have 2 options. 1) Lock the app into landscape which I beleive still can't be done using webworks (but please correct me if i am worng) or 2) scale the app for portrait.
Since to my knowledge 1) cannot be done, i'll focus on 2). Has anyone seen or written a javascript/css script which will check if the user is holding the tablet in landscape or portrait and adapt to switching b/w the 2 on the fly? My app is made for 1024x600. I know it can be scaled using the CSS on startup to 0.6 to fit the screen, but i am not sure how to check and then re-scale afterward with javascript.
Any help, please and thanks.
Solved! Go to Solution.
05-19-2011 05:20 PM - edited 05-19-2011 05:21 PM
Actually, you can lock it in landscape orientation by putting
<rim: orientation mode="landscape" />
in your config.xml. Just remove the space after "rim:" because I added it to prevent the message board from rendering it as
, haha.
05-20-2011 09:37 AM
This worked great!!! Thanks so much for this. I spent so much time looking into resizing for flipping, this is so much easier and the game is in its proper format now.
07-23-2012 10:00 PM
Your method is available, and solves my problem which puzzled me for many days.
Thank you!