The reason is that your overlay does not absorb touch events, so by design, if the view does not consume touch events, the events are passed to the main view in the view model. So the long answer is to make your overlay tangible, customizable, and touch listener and return true. The short answer adds android:clickable="true" to your overlay view.
source share