user2355058
user2355058

Reputation:

How to inflate views over a googlemap and isolate click/touch listerers

I want to inflate a CardView over my map and have its touch events be isolated from the map and vice versa. Currently the map listener picks up touch events on my card. My code current inflates my LinearLayout and CardView and puts it inside a FrameLayout next to my SupportMapFragment.

Tried THIS solution called disableTouchTheft, but there was always a null pointer exception when the method called childView.getParent().

Upvotes: 0

Views: 36

Answers (1)

Billy
Billy

Reputation: 1374

If your LinearLayout that's backing your CardView has an empty OnClickListener set on it, it should be able to consume the event so that it doesn't get sent onto the SupportMapFragment.

Upvotes: 0

Related Questions