title: ScrollView with children view, how to intercept scroll conditionally
body: <p>I have a container <code>ViewGroup</code>, lets call it <strong>screen</strong> inside a <code>ScrollView</code>. This container view hosts a number of other <code>Views</code> let's call them <strong>widgets</strong>, and some of them are interested in preventing the ScrollView from scrolling and using the MotionEvent theirselves (for example a pannable image)</p>
  
  <p>I can't figure out the proper event intercept strategy to use. <code>ScrollView</code> always processes the event before the children, or the children process the event but <code>scrollview</code> is disabled.</p>
  
  <p>I read about issuing <code>getParent().requestDisableInterceptTouchEvent()</code> in the child views if this view wants to capture the event, but their <code>onTouchEvent</code> is not called, I suppose because <code>ScrollView</code> has engulfed the event beforehand. I guess the fact that I have 2 levels of layers (container + widgets) prevents this from working, I suppose the container <code>ViewGroup</code> has to play an important part here, but I can't figure out which one...</p>
  
  <p>Can I know, at the <code>ScrollView's</code> <code>onInterceptTouchEvent</code> level, which widget on the container <code>viewGroup</code> has been touched to decide if I should intercept or not?</p>
  
  <p>or...</p>
  
  <p>How can the 'widget' layers <strong>in the <code>ViewGroup</code></strong> get the event before <code>ScrollView</code> so I can call <code>getParent().onRequestDisableInterceptTouch()</code>  ... or is it <code>getParent().getParent().onRequestDisableInterceptTouch()</code>?  </p>
  
  <p>Thanks in advance</p>
  
  <p>I've read related questions but no luck ...
  <a href="https://stackoverflow.com/questions/12660624/handle-touch-events-in-scrollview-android">Handle touch events in ScrollView Android</a></p>