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
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Portrait Bezel Gestures

[ Edited ]

Hey guys and gals,

 

there has been a huge wonder in the community about how the swipes on the bezel will work if the playboook is rotated to portrait mode. a recent video at SXSW shows these gestures and more in protrait mode. here is a link to the video:

 

http://www.youtube.com/watch?v=yycpJgsozGk

 

how we will have to handle this on our end is unknown to me but at least we know that the roation does change the way the bezel works!

 

EDIT: For those in a rush, you can skip to 5:45 of the video and that's where the fun begins!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Portrait Bezel Gestures

I would hope and think that the events the application receives is not different based on the orientation of the device.  The events would be relative to the orientation and not absolute to the device.

Developer
Posts: 297
Registered: ‎10-30-2010
My Device: PlayBook
My Carrier: other

Re: Portrait Bezel Gestures

[ Edited ]

 


jtegen wrote:

I would hope and think that the events the application receives is not different based on the orientation of the device.  The events would be relative to the orientation and not absolute to the device.


 

Zactly.

 

PlayBook looks super amazing! :robotvery-happy: I expect 1.0GM SDK will be out on March 31st as well.

Trusted Contributor
Posts: 108
Registered: ‎12-28-2010
My Device: Free PlayBook
My Carrier: Verizon

Re: Portrait Bezel Gestures

I agree with John. The bezel gestures are for the system only. The only except to this is the down swipe from the top bezel. This just shows that the system will dispatch the QNXApplicationEvent.SWIPE_START event correctly depending on the orientation of the device. I don't think we'll ever have access to the other gestures. Which is the way it should be.

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

Re: Portrait Bezel Gestures

I watched that video with interest and agree that it does clear up one of the questions we've had, though we really never expected this to work any other way.  Certainly for apps which reorient themselves properly, most of us always believed the bezel gestures would naturally track the current orientation in the expected manner.

 

Unfortunately it still leaves open one interesting question, as we discussed earlier in this thread.  Specifically, for an app with a fixed orientation, if you have the device oriented the other way (turned 90 degrees to the app), how are the bezel gestures reoriented.

 

Think it through carefully before jumping on that and saying it acts identically to how it works with the reorienting apps.

 

If you have an app fixed in portrait mode, but the device is held in landscape mode (so the app is turned sideways), then the "top" of the screen for the app is (say) on the left. 

 

Now you do a "top-swipe" relative to the tablet itself.  Most would agree it would be unusual if this was interpreted as a right-swipe gesture to switch between apps.  Agreed.  So it must be a "top-swipe" to the app, right?  Well, does the app pull down its app menu from the left, across the narrow part of the screen?  Really?  So, while your finger is tracking down the screen from the camera towards the BlackBerry logo, the app sees it as though you are moving your finger "down" into the screen (but really from the left)... this would require the X and Y coordinates to be swapped, and the user would see the menu appearing one the left instead of where they dragged their finger.  For SWIPE_DOWN this might be just weird, but for SWIPE_START it would be downright bizarre, since you can make the menu appear but then disappear again if you move your finger back into the bezel region.

 

And what about the system menu?  If you top-left or top-right swipe, does the system menu appear in landscape mode, relative to the tablet orientation?  That would make it appear sideways along the edge of the app, with the text rotated 90 degrees relative to the text in the app.

 

Somehow I still get the impression we've never been shown this because it just makes little sense no matter which way you do it...  And that video doesn't close the book on this question at all.


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!
Trusted Contributor
Posts: 108
Registered: ‎12-28-2010
My Device: Free PlayBook
My Carrier: Verizon

Re: Portrait Bezel Gestures

Hey Peter, you make a good point. It would be nice if the system recognizes something like stage.align = StageAlign.TOP_LEFT and the bezel gestures don't change orientation like the app.

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Portrait Bezel Gestures

most likely the gesture changes will be heavily reliant on the <autoOrient> tags in the -app.xml configuration file. and it'll respond accordingly. seems the most logical way to go :smileyhappy:

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Portrait Bezel Gestures

I just posted a lengthy description of how this works in the build we played with at the Dev Day in Toronto yesterday.  Apologies for the length of that, but it's much harder to describe than it is to demonstrate.

 

In short, they've picked what is probably the best way for this to work, even if it's going to be slightly confusing under certain conditions (swiping between apps with fixed orientations different from the one the device is held in).


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!