Frage

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?

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top