On the BlackBerry PlayBook, the top bezel is reserved for developers in order to create an app specific “swipe-down menu”. While not enough apps make use of this, for those that do there does not yet appear to be any standard behavior on how to close these menus. I propose a simple solution, that the menu should swipe back up off the screen.
Most developers do tween the menu back off the top of the screen after a selection, or a touch outside of the menu area, but like you can swipe down to display the menu, you should also be able to swipe back up in order to hide it again. This is the approach that has been added to version 2.7 of Pixelated and version 1.1 of Black Out.
In order to implement this, when the menu is opened gesture swipe are listened for using the code: stage.addEventListener( TransformGestureEvent.GESTURE_SWIPE, onSwipe)
and then if the TransformGestureEvent’s offsetY == -1
(in the up direction), and the localY
is less then the menu’s height, a command is then sent to remove the menu from the screen. (Otherwise the swipe is ignored).
This gives a more consistent user interface, as swiping from the top bezel to the screen opens the menu, and swiping from the on screen menu to the top bezel hides it. The more developers that use this, the more customers will know to expect it, and the better their PlayBook experience will be.