I am trying to scroll down continuously using gesture description using accessibility. Here is my code for swipe down
val displayMetrics = resources.displayMetrics
val height : Int = displayMetrics.heightPixels;
val top : Float = height*0.25.toFloat()
val bottom :Float = height *0.75.toFloat()
val swipePath = Path()
swipePath.moveTo(top, bottom)
swipePath.lineTo(top, top)
val gestureBuilder = GestureDescription.Builder()
gestureBuilder.addStroke(GestureDescription.StrokeDescription(swipePath, 0, 1000))
dispatchGesture(gestureBuilder.build(), null, null)
Please help.