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

Adobe AIR Development

Reply
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Behaviour of PB for app that doesn't reorient

[ Edited ]

 


peter9477 wrote:

But maybe if you let the landscape-only app go fullscreen, then in effect you've just disabled rotation as long as that app is active.  The bezel you just used to side-swipe your way to the app suddenly becomes either it's top or bottom bezel, as appropriate.


 

At the Developer Day yesterday, JLX-Jon and I spent some time studying how the swiping worked in conjunction with apps that had a fixed orientation.

 

With the "orientation lock" disabled, we invoked two apps, one fixed in landscape mode (the system calculator) and the other fixed in portrait mode (Tetris).  We also had a couple of other auto-orienting apps open for comparison.

 

When you switch to a landscape-only app (the calculator), the device interprets bezel gestures relative to the orientation of the app regardless of the physical device orientation.  That means even if you rotate the device sideways or upside down, swiping from the camera into the screen is a "top-swipe" and shows the context menu.  Swiping from the BlackBerry logo into the screen minimizes the app.

 

When you select the portrait-only app (Tetris), the bezel gestures are again relative to the app, so as you move from one app to the next they change.  If you're on the calculator (holding the device in the standard orientation where the camera is "up"), you right-swipe to move to the next app.  If that app is Tetris, and you don't rotate the device physically, you will now have to swipe down from the camera -- performing a right-swipe from Tetris' point of view -- to move to the next app beyond it.

 

In effect, of the two fairly obvious possibilities discussed earlier, both of which have "warts", they chose the lesser of two evils by picking the one where the bezel gestures may change from one app to the next.  (The worse evil was to have the context menu appear on a different side from where you were swiping... the "insane" approach.)

 

The designers went beyond this, however, which is good.  (To our credit :-), they had hardware to play with, and we've never had it before.)  What they've done is in effect what we might call a temporary orientation-inhibit, when a fixed-orientation app is selected.  It's a bit hard to describe, but I'll try.

 

With auto-orienting apps and the orientation-lock disabled, when you flip the tablet around it sends an event to the apps saying to reorient themselves.  With orientation-lock enabled, that event is effectively suppressed... obviously.

 

With fixed-orientation apps, however, the orientation event is also in effect suppressed, but the device orientation is forced to whatever orientation the app requests.

 

This means that if you select a portrait-only app but are holding the device in landscape mode, the device switches to the portrait orientation.  If you then swipe to a different app which is NOT fixed-orientation, its orientation is also set to portrait mode even though you're holding the device in landscape mode, orientation-lock is off, and the selected app supports reorientation.  I'll call this a non-obvious choice, but one which works pretty well on the device.  It works because (by observation we assume) no orientation-change event would be sent under these conditions so the device stays in the last orientation it was forced into (by your having selected the portrait-only app).

 

If you wanted the current auto-orienting app to show itself in landscape mode to match the physical device orientation, you'd have to flip the device to portrait mode, then back to landscape mode, to generate an orientation-change event that would then be delivered to the app.

 

I know that might be a poor explanation, but it's the best I can do for now... if someone with an ability to explain complex technical things in clear, concise prose is reading this, please add a followup, then go get yourself hired by QNX so we can have better documentation!  I hear they're hiring technical writers (seriously). :smileyhappy:


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
jffurlan
Posts: 1,003
Registered: ‎01-16-2011
My Device: PlayBook (sim)
My Carrier: Rogers

Re: Behaviour of PB for app that doesn't reorient

Excellent follow up Peter. Glad to hear they didn't take the "insane" approach

- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. -
- Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started -
- Hockey DrillBook -
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Behaviour of PB for app that doesn't reorient

 


peter9477 wrote: 

When you select the portrait-only app (Tetris), the bezel gestures are again relative to the app, so as you move from one app to the next they change.  If you're on the calculator (holding the device in the standard orientation where the camera is "up"), you right-swipe to move to the next app.  If that app is Tetris, and you don't rotate the device physically, you will now have to swipe down from the camera -- performing a right-swipe from Tetris' point of view -- to move to the next app beyond it.


 

There's a nice demonstration of the mild (/?) user confusion that will arise from this approach.

 

In this video at about 0:46 the fellow (with the device in landscape but running the portrait-only Tetris) does a swipe from the bottom bezel.  This is interpreted as a left-swipe (because the app is portrait-only) so it switches directly to the other app, which is the landscape-only Need For Speed.  Not understanding quite what he's doing, he does the same gesture again, but of course this time it's interpreted as a bottom-swipe so it minimizes NFS.

 

He does similar things several times later, each time pausing briefly after the minimize happens, as though slightly puzzled by what just happened.

 

Later on (at 5:00) he finally discovers that side-swipes will move directly between apps so you don't always have to minimize, but he doesn't spend enough time exploring to work out the whole behaviour described earlier in this thread.

 

Anyway, I'd call it one data point showing that a rookie user can figure out how to work the device pretty well even with the bezel swiping and a mix of landscape, portrait, and auto-orienting apps.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.