List of usage examples for android.view MotionEvent ACTION_SCROLL
int ACTION_SCROLL
To view the source code for android.view MotionEvent ACTION_SCROLL.
Click Source Link
From source file:com.appunite.list.AbsListView.java
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR1) @Override//from www .ja v a2 s . com public boolean onGenericMotionEvent(MotionEvent event) { if ((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) { switch (event.getAction()) { case MotionEvent.ACTION_SCROLL: { if (mTouchMode == TOUCH_MODE_REST) { final float vscroll = event.getAxisValue(MotionEvent.AXIS_VSCROLL); if (vscroll != 0) { final int delta = (int) (vscroll * getVerticalScrollFactorUnhide()); if (!trackMotionScroll(delta, delta)) { return true; } } } } } } return super.onGenericMotionEvent(event); }