问题
Suppose I use this command:
adb shell input touchscreen swipe x1 y1 x1 y2 50
How can I know how much pixels will it really scroll?
Is there any way to calculate it?
回答1:
The default value of the duration
parameter is set to 300ms
for a reason - anything less than that and your swipe
has a much higher chance to become a fling
(also depending on the delta of your coordinates) - which will not be precise and/or consistent.
So there is no way to find out how many pixels your specific (i.e. with shorter than recommended duration) command will scroll ahead of time.
来源:https://stackoverflow.com/questions/39294591/how-much-would-a-swipe-down-up-move-a-normal-vertical-recyclerview-list