function 无障碍_手势滑动(坐标组,time) --数组:坐标点
if time==nil or time=="" then
time=3000
end
local gesture = Gesture:new()
local path = Path:new()
path:setStartTime(10)
path:setDurTime(time)
for i=1,#坐标组,2 do
path:addPoint(坐标组[i],坐标组[i+1])
end
gesture:addPath(path)
local r = gesture:dispatch()
local t=50+time
sleep(t)
return r ----true false
end
local r=无障碍_手势滑动({350,retAh[1].y,2000,retAh[1].y},150)
|