Beware the Bezel Swipe

In a tweet from a couple of weeks ago, Cyril Mottier points out a problem with multi-window mode on Android N: bezel (or edge) swipes.

In split-screen mode, in landscape, a bezel swipe from the edge where the divider is between screens will be troublesome. Users may be aiming for the bezel swipe and wind up grabbing and dragging the divider to resize the two panes.

While I have yet to play with the freeform multi-window feature, I would imagine that there will be similar problems there, particularly if users are working with mice instead of fingers. Users might accidentally wind up moving or resizing a window, rather than doing whatever your edge swipe was supposed to do.

Frankly, bezel swipes have always made me nervous. Device manufacturers, from Samsung to BlackBerry, have used bezel swipes for their own purposes, conflicting with what apps might do. Apps themselves may overload horizontal swiping gestures as well: does a swipe in from the left edge open a navigation drawer, switch to a new page in a ViewPager , or pan the content in the current page?

With multi-window, we are entering a world where the edges of the window are not the edges of the device screen, increasing the chances that the user will accidentally do the wrong thing for touch events near those edges.

Make sure that anything in your app that depends upon an edge or bezel swipe can be accomplished in some other way, such as the “hamburger” icon for a navigation drawer. Then, consider disabling the bezel swipe option, at least when you are running in multi-window mode.

Beyond that, my own personal “style guide” says that horizontal swipe gestures should be consistent within a visually distinct area. So, for example, a full-screen map inside a ViewPager in an activity with a navigation drawer would violate this, as an edge swipe might trigger three different things (pan the map, change the page, open the drawer). Adding some margin around the map, so the “change the page” touch zone lies outside the map boundaries, can help distinguish those roles for horizontal swipes.

Interested in Jetpack Compose? jetc.dev has a weekly newsletter of the latest articles, samples, and other details of Compose development!

— Mar 29, 2016