# Gesture Navigation: Handling gesture conflicts (III)

DevFeed: [Gesture Navigation: Handling gesture conflicts (III)](<https://devfeed.tech/articles/gesture-navigation-handling-gesture-conflicts-iii-24923.md>)

Original publisher: [Read original article](<https://medium.com/androiddevelopers/gesture-navigation-handling-gesture-conflicts-8ee9c2665c69?source=rss-9303277cb6db------2>)

Author: Chris Banes

Published: 2019-10-17T00:09:31Z

Content type: article

Language: en

Sources: [Chris Banes on Medium](<https://devfeed.tech/sources/chris-banes-on-medium.md>)

Topics: [User interface design](<https://devfeed.tech/topics/ui-design.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>), [navigation-drawer](<https://devfeed.tech/topics/navigation-drawer.md>), [bottomsheet](<https://devfeed.tech/topics/bottomsheet.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-10](<https://devfeed.tech/tags/android-10.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [api](<https://devfeed.tech/tags/api.md>), [gesture-navigation](<https://devfeed.tech/tags/gesture-navigation.md>), [handling](<https://devfeed.tech/tags/handling.md>), [music-player](<https://devfeed.tech/tags/music-player.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [sliders](<https://devfeed.tech/tags/sliders.md>), [solutions](<https://devfeed.tech/tags/solutions.md>), [ux](<https://devfeed.tech/tags/ux.md>)

## AI overview

The excerpt recommends first checking whether a gesture conflict needs handling, then moving affected controls out of system gesture areas when practical. For a bottom-edge SeekBar, padding it by the system gesture inset can prevent the home gesture from taking priority; rearranging the layout can avoid the extra blank space that padding may create. For edge swipes, Android 10's gesture exclusion APIs can protect a control such as a SeekBar thumb, with the View API handling view-coordinate conversion and the Window API using window coordinates. Exclusion is an escape hatch because it can interfere with back navigation: Android honors at most 200dp per edge, and only the bottom-most requested 200dp; off-screen portions do not count. The excerpt says apps cannot exclude the mandatory bottom gesture area, so controls there should be moved clear of it.

## Source excerpt

Cover image by Virginia PoltrackGesture Navigation: handling gesture conflicts (III) This is the third post in our series on Gesture Navigation. If you want to skip to another post, you can find them listed below: Gesture Navigation: Going edge-to-edge (I) Gesture Navigation: Handling visual overlaps (II) Gesture Navigation: Immersive Modes (IV) The previous post marks the end of us talking about drawing to the edges. In this third post we're going to cover how to handle any gesture conflicts, between your app and the new system gestures in Android 10. What do we mean by gesture conflicts? Let's take a look at an example. Here we have a music player app, which allows the user to scrub through the current song by dragging a SeekBar. Unfortunately, the SeekBar is too close to the home gesture area resulting in the system quick-switch gesture taking over and confusing the user. The same thing can happen on any of the screen edges with gesture areas. There are plenty of common examples which can cause conflicts, such as: Navigation drawers (DrawerLayout), carousels (ViewPager), sliders (SeekBar), swipe actions on lists. Which brings us onto the question of 'how can we fix this?'. To help with this question, we've created a flow chart to help guide to one of the solutions. You can find a printable PDF version of the flow chart here. Hopefully the questions are self-explanatory, but in case you're not sure on any of them, let's explain each of them: 1. App required to hide navigation and status bars? The first question is asking if your app's main use case requires hiding of the navigation and/or status bars. By hiding we mean that they those system bars are not visible at all. It does not mean that you've made your app go edge-to-edge, or similar. Possible reasons for answering yes to this question are: You use the FLAG_FULLSCREEN WindowManager flag. Note, this can also be done via the android:windowFullscreen theme attribute, or extend from one of the Theme.XXX.Fullscre