I have application in which I need onTouch swipe Up and Down event. I have implemented onTouch event in application but I have not any idea related to Swipe Up and Swipe Down Does anybody have a code that how can I do this?
final ImageView imageView = listOfImageView.get(i);
            imageView.setOnTouchListener(new OnTouchListener () {
                private float oldPosition;
                public boolean onTouch(View view, MotionEvent event) {
                    if (event.getAction() == android.view.MotionEvent.ACTION_DOWN) {
                        this.oldPosition = event.getY();
                    }
                 }
            });
