@@ -0,0 +1,1270 @@
+package cn.diaovision.omnicontrol.widget;%0A%0Aimport android.content.Context;%0Aimport android.support.v4.view.ViewPager;%0Aimport android.util.AttributeSet;%0Aimport android.view.MotionEvent;%0A%0A/**%0A * Created by TaoYimin on 2017/5/22.%0A */%0Apublic class VerticalViewPager extends ViewPager %7B%0A%0A    public VerticalViewPager(Context context) %7B%0A        this(context, null);%0A    %7D%0A%0A    public VerticalViewPager(Context context, AttributeSet attrs) %7B%0A        super(context, attrs);%0A        setPageTransformer(false, new ViewPagerTransformer());%0A    %7D%0A%0A    private MotionEvent swapTouchEvent(MotionEvent event) %7B%0A        float width = getWidth();%0A        float height = getHeight();%0A%0A        float swappedX = (event.getY() / height) * width;%0A        float swappedY = (event.getX() / width) * height;%0A%0A        event.setLocation(swappedX, swappedY);%0A%0A        return event;%0A    %7D%0A%0A    @Override%0A    public boolean onInterceptTouchEvent(MotionEvent event) %7B%0A        boolean intercept = super.onInterceptTouchEvent(swapTouchEvent(event));%0A        //If not intercept, touch event should not be swapped.%0A        swapTouchEvent(event);%0A        return intercept;%0A    %7D%0A%0A    @Override%0A    public boolean onTouchEvent(MotionEvent ev) %7B%0A        return super.onTouchEvent(swapTouchEvent(ev));%0A    %7D%0A%0A%7D

add vertical viewpager