Class

GestureScope

The receiver scope for injecting gestures on the SemanticsNode identified by the corresponding SemanticsNodeInteraction.

gestureClick

@Suppress("DEPRECATION")
@Sampled
fun gestureClick() {
    composeTestRule.onNodeWithTag("myComponent").performGesture { click() }
}

gestureSwipeUp

@Suppress("DEPRECATION")
@Sampled
fun gestureSwipeUp() {
    composeTestRule.onNodeWithTag("myComponent").performGesture { swipeUp() }
}

gestureLShape

@Suppress("DEPRECATION")
@Sampled
fun gestureLShape() {
    composeTestRule.onNodeWithTag("myComponent").performGesture {
        down(topLeft)
        moveTo(topLeft + percentOffset(0f, .1f))
        moveTo(topLeft + percentOffset(0f, .2f))
        moveTo(topLeft + percentOffset(0f, .3f))
        moveTo(topLeft + percentOffset(0f, .4f))
        moveTo(centerLeft)
        moveTo(centerLeft + percentOffset(.1f, 0f))
        moveTo(centerLeft + percentOffset(.2f, 0f))
        moveTo(centerLeft + percentOffset(.3f, 0f))
        moveTo(centerLeft + percentOffset(.4f, 0f))
        moveTo(center)
        up()
    }
}
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: