Search code examples
androidtouchconditional-statementsinterceptinterception

How to do conditional touch interception?


I have a RecyclerView what fills my main activity. It works fine, however, sometimes a view (let's call this View2) appear at the bottom of the activity, so the RecyclerView remains visible, but the appearing View2 overlaps the bottom of the list. Unfortunately this doesn't work well for me. When I touch on the appeared view the list item under View2 receives the touch event. I want to hide View2 when I touch it. I think a Snackbar behaves really similar to the one I would like to achieve.


Solution

  • Is the appearing view a PopupWindow, Toast or Dialog? Seems View2 is not clickable and touchable.