What is the difference with this two methods?

@Override
        public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
                float velocityY) {
            return super.onFling(e1, e2, velocityX, velocityY);
        }

@Override
        public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
                float velocityY) {
            return true;
        }

the second onFling return true and first return its method, what is the difference of this two and which of this two is the best practice in returning onFling?

有帮助吗?

解决方案

It is based on your requirement. If you don't want the android frame work to handle onFling , return true.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top