Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
ignites
Posts: 466
Registered: ‎04-11-2012
My Device: Bold 9900
Accepted Solution

How to tell what mode (landscape/portrait) user is in

How can you tell / set to change your screen settings in html5/webworks if the user changes orientation of the device?


Developer for easyDial for BlackBerry Bold & inLink for BlackBerry PlayBook
Find me online via twitter, or on the techfruits.com webpage. Please hit the like button below if what I said helped!
Please use plain text.
Developer
ignites
Posts: 466
Registered: ‎04-11-2012
My Device: Bold 9900

Re: How to tell what mode (landscape/portrait) user is in

bump


Developer for easyDial for BlackBerry Bold & inLink for BlackBerry PlayBook
Find me online via twitter, or on the techfruits.com webpage. Please hit the like button below if what I said helped!
Please use plain text.
Retired
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: How to tell what mode (landscape/portrait) user is in

You can use the window.orientation JavaScript object and orientationchange event.  Here is a demo:

http://blackberry.github.com/WebWorks-Samples/kitchenSink/html/browser/orientation.html

 

 

You can also use CSS3 media queries, defining styles for both portrait and landscape.  Here is a demo of that too:

http://blackberry.github.com/WebWorks-Samples/kitchenSink/html/css3/mediaquery.html

 

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.