¡@

Home 

2014/10/16 ¤W¤È 08:23:35

android Programming Glossary: scrollingvertically

ScrollView and Gallery interfering

http://stackoverflow.com/questions/3171452/scrollview-and-gallery-interfering

to avoid detecting horizontal scrolling when vertical scrolling is already in progress and vice versa. private boolean scrollingVertically false Our own gesture detector Gallery's mGestureDetector is private. We'll feed it with motion events from `onInterceptTouchEvent`.. switch ev.getAction case MotionEvent.ACTION_UP case MotionEvent.ACTION_CANCEL scrollingHorizontally false scrollingVertically false Feed our gesture detector mBetterGestureDetector.onTouchEvent ev Intercept motion events if horizontal scrolling.. switch event.getAction case MotionEvent.ACTION_UP case MotionEvent.ACTION_CANCEL scrollingHorizontally false scrollingVertically false super.onTouchEvent event return scrollingHorizontally private class BetterGestureListener implements GestureDetector.OnGestureListener..