public boolean onTouchEvent(MotionEvent motionevent) { switch (motionevent.getAction()) { case MotionEvent.ACTION_DOWN: x = motionevent.getRawY(); break; case MotionEvent.ACTION_MOVE: y = motionevent.getRawY(); z = x - y; x = y; totalScrollY = (int) ((float) totalScrollY + z); if (!isLoop) { if (totalScrollY > (int) ((float) (-positon) * (l * (float) h))) { break; /* Loop/switch isn't completed */ } totalScrollY = (int) ((float) (-positon) * (l * (float) h)); } break; case MotionEvent.ACTION_UP: default: if (!gestureDetector.onTouchEvent(motionevent) && motionevent.getAction() == 1) { f(); } return true; } if (totalScrollY < (int) ((float) (arrayList.size() - 1 - positon) * (l * (float) h))) { invalidate(); } else { totalScrollY = (int) ((float) (arrayList.size() - 1 - positon) * (l * (float) h)); invalidate(); } if (!gestureDetector.onTouchEvent(motionevent) && motionevent.getAction() == 1) { f(); } return true; }
static void b(LoopView loopview) { loopview.f(); }