Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intercepting clicks from subview in Android

My application has a custom view which contains other custom views of a different type. The subviews have their own click listeners (which I can't change, as these are in 3rd party libraries). How can I intercept a user's click at the level of my view to do some processing, and then pass the click on to the proper subview?

like image 719
Justin Avatar asked Jan 05 '10 00:01

Justin


1 Answers

Justin, you can play with dispatchTouchEvent() or onInterceptTouchEvent().

like image 179
Romain Guy Avatar answered Oct 15 '22 15:10

Romain Guy