I have a Map view with some pins of certain locations, whenever a location is pressed a bottom LinearLayout popup is displayed.
Whenever the user clicks on the map but not on the popup, the popup is dismissed.
We have a bug, that whenever the popup is clicked, it is also dismissed, probably because the event is delegated to the first responder view, which is the map.
However, somehow, by setting . pupup.setOnClickListener(null)
fixes the issue and click events are no longer delegated.
I certainly does not understand the logic on this, the popup didn't have any listener neither from XML or Code, and by debugging hasOnClickListeners()
resolves to false
so I don't get why by setting it again to null
removes any delegation.
Any insight on this?