If I have several ViewGroups overlap each other. Is it possible to pass the onTouch() event of a ViewGroup to the underlying ViewGroup?
Each ViewGroup contains Views. But if a touch occurs in an area of a ViewGroup where no View that it contains occupies it, I would like to pass that onTouch() event to the next underlying ViewGroup which also contains Views.
As per I understand your question,
The
main ViewGroupconsume thetouch eventfirst, in that case,Just inflate your layout and make a View..
then using that view define which view you have to use and
setOnTouch().. to that view..For example: