getDirection

fun getDirection(e1: MotionEvent, e2: MotionEvent): FlingDirection

Returns the direction of the fling gesture based on the angle formed between the points defined by the coordinates of the given MotionEvents.

The directions identified are limited to the four cardinal directions.

Return

Direction of the fling gesture.

Parameters

e1

First down motion event that started the fling.

e2

Move motion event that triggered the current onFling.