GesturedeckMedia

constructor(context: Context = GlobalApplication.context, tapAction: () -> Unit? = { MediaControl(context).toggle() }, swipeLeftAction: () -> Unit? = { MediaControl(context).skipPrevious() }, swipeRightAction: () -> Unit? = { MediaControl(context).skipNext() }, panAction: (event: MotionEvent, swipeDirection: SwipeDirection, state: GestureState) -> Unit? = { _: MotionEvent, _: SwipeDirection, _: GestureState -> }, panSensitivity: PanSensitivity? = null, longPressAction: (state: GestureState) -> Unit? = {}, reverseHorizontalSwipes: Boolean = false, autoStart: Boolean = true, observingRootView: Boolean = true, gesturedeckMediaOverlay: GesturedeckMediaOverlay? = GesturedeckMediaOverlay( GlobalApplication.validActivity(context) ), activationKey: String? = null)

Parameters

context

The context of the calling activity.

tapAction

The action to perform when tapping with two fingers.

swipeLeftAction

The action to perform when swipping left with two fingers.

swipeRightAction

The action to perform when swipping right with two fingers.

panAction

The action to perform when panning vertically with two fingers or double tapping and sliding with a single finger.

panSensitivity

The sensitivity of Gesturedeck when panning.

longPressAction

The action to perform when long pressing with two fingers.

reverseHorizontalSwipes

Whether to reverse the direction of horizontal swipes.

autoStart

Start gesturedeck automatically.

observingRootView

Set the touch listener on the root view of the activity, set to false if you want to set the touch listener on a specific view or activity and call onTouchEvent manually.

gesturedeckMediaOverlay

The overlay to display on top of Gesturedeck.

activationKey

An optional activation key to remove watermarks. If not provided, Gesturedeck will present a watermark.