Detecting clicks and releases of ViewPager
<p>I have a conflict between a <code>ScrollView</code> and a <code>ViewPager</code>.</p>

<p>I'm trying to do something along the lines of </p>

<pre><code>If user clicks ViewPager:
   Disable ScrollView

If user releases ViewPager:
   Enable ScrollView
</code></pre>

<p>I've already got the disable/enable code working, but I can't get the click/release code working.</p>

<p>I've tried using <code>OnTouch</code>, as so..</p>

<pre><code>pager.setOnTouchListener(new OnTouchListener() {

    public boolean onTouch(View v, MotionEvent event) {

        if (event.getAction() == MotionEvent.ACTION_DOWN){
            scroller.setScrollingEnabled(false);
        }

        if (event.getAction() == MotionEvent.ACTION_UP){
            scroller.setScrollingEnabled(true);
        }

        return true;
    }
});
</code></pre>

<p>..but this seems to disable the ViewPager from scrolling left and right. Am I using it wrong?</p>

<p>Is there any other alternative to detect presses and releases? Also I'm trying to get it to work on Android 2.1 and higher, so <code>OnDrag</code> doesn't seem compatible.</p>
