{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

Swiper

interface Swiper

Known direct subclasses
Swipe

Executes different swipe types to given positions.


Interface to implement different swipe types.

Summary

Nested types

Swiper.Status

The result of the swipe.

Public functions

Any!
sendSwipe(
    uiController: UiController!,
    startCoordinates: FloatArray!,
    endCoordinates: FloatArray!,
    precision: FloatArray!
)

Swipes from startCoordinates to endCoordinates using the given uiController to send MotionEvents.

Public functions

sendSwipe

fun sendSwipe(
    uiController: UiController!,
    startCoordinates: FloatArray!,
    endCoordinates: FloatArray!,
    precision: FloatArray!
): Any!

Swipes from startCoordinates to endCoordinates using the given uiController to send MotionEvents.

Parameters
uiController: UiController!

a UiController to use to send MotionEvents to the screen.

startCoordinates: FloatArray!

a float[] with x and y co-ordinates of the start of the swipe.

endCoordinates: FloatArray!

a float[] with x and y co-ordinates of the end of the swipe.

precision: FloatArray!

a float[] with x and y values of precision of the tap.

Returns
Any!

The status of the swipe.