@Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { if (this.getChildCount() > 0 && isTouchEnable) { // 根据划动量,切换viewflow if (e2.getX() - e1.getX() > 120) { // 从左向右滑动(左进右出) this.setInAnimation(mLeftInAnim); this.setOutAnimation(mRightOutAnim); if (this.getCurrentView().hashCode() == getChildAt(0).hashCode()) { if (onPageListener != null) { onPageListener.onStartPageListener(); } } else { this.showPrevious(); } } else if (e2.getX() - e1.getX() < -120) { // 从右向左滑动(右进左出) showNextPage(); } } // this.flipStart(); return true; }