1185907650 发表于 2020-9-10 09:27:47

【技术博客文章】火山安卓触摸手势的使用

一、 布局
就放一个编辑框用来显示事件吧
https://www.lkuaiy.com/image/editor/15993162991838.png


二、添加手势事件类变量
在启动类下添加
https://www.lkuaiy.com/image/editor/15993163077905.png


三、添加触摸事件
https://www.lkuaiy.com/image/editor/15993163152097.png

https://www.lkuaiy.com/image/editor/15993163211188.png

https://www.lkuaiy.com/image/editor/15993163275910.png


四、添加手势事件
①添加事件
按需添加各事件
https://www.lkuaiy.com/image/editor/15993163362657.png

https://www.lkuaiy.com/image/editor/15993163418148.png

②单击和双击
https://www.lkuaiy.com/image/editor/15993163488271.png


③按下和按下未动
https://www.lkuaiy.com/image/editor/15993163552085.png

④单击抬起和长按
https://www.lkuaiy.com/image/editor/15993163631099.png

⑤上下左右滑动
https://www.lkuaiy.com/image/editor/15993163704226.png


五、演示效果
https://www.lkuaiy.com/image/editor/15993163787504.gif



例子下载:下载

1185907650 发表于 2020-9-10 20:12:23

推广火山义不容辞

1185907650 发表于 2020-9-11 00:37:07

推广火山,义不容辞

1185907650 发表于 2020-9-11 10:54:39

推广火山,义不容辞

1185907650 发表于 2020-9-12 07:59:35

推广火山,义不容辞

csjd 发表于 2022-11-18 19:44:13

谢谢啦,初来乍到:噜阿噜
页: [1]
查看完整版本: 【技术博客文章】火山安卓触摸手势的使用