0

I have a probelm when registering a View.OnLongClickListener callback to both parent ViewGroup and child View.

After the child View callback has been called, it does not let the event to propagate down to the parent ViewGroup, in either true or false return cases inside the callback onLongClick(View v) method.

It is important to note that the parent ViewGroup is not a custom View.

How can both parent ViewGroup and child View View.OnLongClickListener callbacks be called when long clicking on the child View?

Eido95
  • 1,313
  • 1
  • 15
  • 29
  • Relevant? http://stackoverflow.com/questions/4415528/how-to-pass-the-onclick-event-to-its-parent-on-android – Isaac Dec 21 '16 at 20:53
  • @IsaacPayne `Activity.dispatchTouchEvent(MotionEvent)` does not pass a `View` object so I cannot determine which view was clicked. `ViewGroup.onInterceptTouchEvent(MotionEvent)` also does not pass `View` object and this method only relevant for custom `ViewGroup`. – Eido95 Dec 22 '16 at 11:20

0 Answers0