drag
Press-hold-move-release a drag from start to end coordinates in true device pixels. Use for drag handles, reorder lists, and drag-and-drop targets that require a held start before moving.
Instructions
Press-hold-move-release drag from (x1,y1) to (x2,y2) in true device pixels (input draganddrop, Android 11+). Unlike swipe (which flings), this holds at the start first — use it for drag handles, long-press-to-reorder lists, and drag-and-drop targets a quick swipe skips.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x1 | Yes | Start X in true device pixels. | |
| x2 | Yes | End X in true device pixels. | |
| y1 | Yes | Start Y in true device pixels. | |
| y2 | Yes | End Y in true device pixels. | |
| serial | No | Target device serial (adb -s). Optional when exactly one device is attached. | |
| duration_ms | No | Drag duration in ms. Default 400. |