Is there any way to dispatch touch event only to specific child in custom view group with stacked children.
Asked
Active
Viewed 2,165 times
1
-
1Managing touch events in a viewgroup should help. Try this - http://developer.android.com/training/gestures/viewgroup.html – Anukool Sep 17 '13 at 09:12
1 Answers
-1
For as long as you have reference on both, the child you want to receive the event and the parent, you can implement the parent to pass the touch to the child you wish to receive it.
can you post the code of the View?
So you can make something like:
@Override
public boolean onTouchEvent(Event e){
childToGetTheEvent.onTouchEvent(e);
}
Or is there any reason you cant do something like this?

Daniel Bo
- 2,518
- 1
- 18
- 29
-
-
Tried something like this. but my button inside that child is taking touch outside button area – MGK Sep 17 '13 at 09:48
-
-
Yeah post your code. Im just guessing at the moment because i dont know what you are doing in your code. – Daniel Bo Sep 17 '13 at 09:57