if node.isEditable() or service.isShowInputWindow()
service.click({{"发送|发送消息|确定|保存|发表|评论|回复|完成|发布|*登陆|下一步*|搜索|好|提交|确认"}})
service.getEditText()
elseif service.isInCalling()
service.endCall()
elseif service.isRinging()
service.acceptCall()
elseif service.isSeekBar(node)
require "import"
import "android.graphics.Rect"
import "android.widget.*"
local t={"0","5","10","15","20","25","30","35","40","45","50","55","60","65","70","75","80","85","90","95","100",}
layout=
{
LinearLayout,orientation=1,layout_width=-1,layout_height=-1,{
EditText,hint="请输入百分比",Gravity="center_horizontal",id="edit",InputType="phone",layout_width=-1,layout_weight=1,},
{Button,text="确定",onClick="zb",layout_width=-1,layout_weight=1,},
{GridView,id="grid",numColumns=3,layout_weight=1,}
}
dlg=LuaDialog(service)
dlg.View=loadlayout(layout)
grid.adapter=SingleLineAdapter(service,String(t))
dlg.show()
grid.onItemClick=function(l,v,p,i)
dlg.dismiss()
local p=Rect()
node.getBoundsInScreen(p)
task(300,function()
service.click({{"["..tonumber(p.left)..","..tonumber(p.top+(p.bottom-p.top)/2)..","..tonumber(p.left+(p.right-p.left)/100*v.text)..","..tonumber(p.top+(p.bottom-p.top)/2)..",300]"}})
end)
end
function zb()
local p=Rect()
node.getBoundsInScreen(p)
dlg.dismiss()
task(300,function()
service.click({{"["..tonumber(p.left)..","..tonumber(p.top+(p.bottom-p.top)/2)..","..tonumber(p.left+(p.right-p.left)/100*edit.text)..","..tonumber(p.top+(p.bottom-p.top)/2)..",300]"}})
end)
end
else
service.execute("播放暂停")
end
return true