1.在窗体上使用并放置一个TGestures控件是必需的
2.如果要操作控件,并使按件能支持手势操作,还要进行一些相应的设置才能使用
3.本经人试验(由于这玩意开发太慢,没办法一个个试出来,要好久的),主窗体的Touch下的GestureManager属性要指定TGestures控件,然后在Gestures下的Standard属性下要选中相应的动作,比如:
Left:从右到左划动
Right:从左到右划动
Up:从下到上划动
Down:从上到下划动
UpLeft:从下到上左
UpRight:从下到上右
剩下的你自己可以理解了..........
这里建议你只选你要的动作,不要什么动作都支持,那样的结果只会导致你的程序变的巨慢
这里还有一个属性集:
[![Delphi-XE5-手势操作-Gestures-使用方法](http://ugc.qpic.cn/adapt/0/e36bff86-29b5-9c63-a61b-1dbca8b08480/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fphoto.blog.sina.com.cn%2Fshowpic.html%23blogid%3D722bc92e0101f6w2%26amp%3Burl%3Dhttp%3A%2F%2Falbum.sina.com.cn%2Fpic%2F0025D7Ougy6EmZCdlcn2b)
InterActiveGestures:交互手势
igZoom:选择为True后可以支持放大缩小功能
igPan:百度翻译为锅![Delphi-XE5-手势操作-Gestures-使用方法](http://ugc.qpic.cn/adapt/0/38057bdc-ddc6-f7cd-5a12-dfc2e8e15e58/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")应该是支持画圆等操作(这个等我证实后再更正)
igRotate:旋转
igTwoFingerTap:支持两个手指同时操作
igPressAndTap:新闻和水龙头(百度翻译)实际应该理解为手指划折线的支持(有待证实)
igLongTap:长的水龙头(百度翻译)实际理解为手指画长折线的支持(有待证实)
igDoubleTap:双击操作(字面理解,也没实践)
4.不支持动作的解决
可在窗体上放置一个标签用来显示动作值,即在窗体的onGesture事件中捕获EventInfo.GestureID的常量,通常从右往左手势的值为1,从左至右的手势值为2,如果能正确显示相应数值,基本上手势是在这个应用上被支持了,但至于你的手势是否被响应了,这要看你的代码了。
5.手势参考
Delphi 把可以识别的手势分成了 3 类: 标准手势、自定义手势、交互手势(InteractiveGestures).
其中的交互手势用鼠标不好模拟, 可能只能用于触摸屏;
Delphi 预定义了 34 种标准手势, 并定义成 TStandardGesture 枚举类型:
* * *
TStandardGesture = ( sgLeft = sgiLeft, sgRight = sgiRight, sgUp = sgiUp, sgDown = sgiDown, sgUpLeft = sgiUpLeft, sgUpRight = sgiUpRight, sgDownLeft = sgiDownLeft, sgDownRight = sgiDownRight, sgLeftUp = sgiLeftUp, sgLeftDown = sgiLeftDown, sgRightUp = sgiRightUp, sgRightDown = sgiRightDown, sgUpDown = sgiUpDown, sgDownUp = sgiDownUp, sgLeftRight = sgiLeftRight, sgRightLeft = sgiRightLeft, sgUpLeftLong = sgiUpLeftLong, sgUpRightLong = sgiUpRightLong, sgDownLeftLong = sgiDownLeftLong, sgDownRightLong = sgiDownRightLong, sgScratchout = sgiScratchout, sgTriangle = sgiTriangle, sgSquare = sgiSquare, sgCheck = sgiCheck, sgCurlicue = sgiCurlicue, sgDoubleCurlicue = sgiDoubleCurlicue, sgCircle = sgiCircle, sgDoubleCircle = sgiDoubleCircle, sgSemiCircleLeft = sgiSemiCircleLeft, sgSemiCircleRight = sgiSemiCircleRight, sgChevronUp = sgiChevronUp, sgChevronDown = sgiChevronDown, sgChevronLeft = sgiChevronLeft, sgChevronRight = sgiChevronRight);
| Enum | Symbol |
| --- | --- |
| sgLeft | [![image:64GestLeft.gif](http://ugc.qpic.cn/adapt/0/996c2d1a-5abe-e7e9-4623-bef88cfcb9b2/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestLeft.gif "image:64GestLeft.gif") |
| sgRight | [![image:64GestRight.gif](http://ugc.qpic.cn/adapt/0/6a2d85a3-a6ae-1b5c-0be7-0db37b3f2302/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestRight.gif "image:64GestRight.gif") |
| sgUp | [![image:64GestUp.gif](http://docwiki.embarcadero.com/images/RADStudio/e/d/d4/64GestUp.gif?pt=5&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestUp.gif "image:64GestUp.gif") |
| sgDown | [![image:64GestDown.gif](http://docwiki.embarcadero.com/images/RADStudio/e/f/f4/64GestDown.gif?pt=5&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestDown.gif "image:64GestDown.gif") |
| sgUpLeft | [![image:64GestUpLeft.gif](http://docwiki.embarcadero.com/images/RADStudio/e/9/96/64GestUpLeft.gif?pt=5&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestUpLeft.gif "image:64GestUpLeft.gif") |
| sgUpRight | [![image:64GestUpRight.gif](http://docwiki.embarcadero.com/images/RADStudio/e/3/3b/64GestUpRight.gif?pt=5&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestUpRight.gif "image:64GestUpRight.gif") |
| sgDownLeft | [![image:64GestDownLeft.gif](http://docwiki.embarcadero.com/images/RADStudio/e/8/83/64GestDownLeft.gif?pt=5&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestDownLeft.gif "image:64GestDownLeft.gif") |
| sgDownRight | [![image:64GestDownRight.gif](http://ugc.qpic.cn/adapt/0/f9293717-1ac0-50f7-9ff1-723184710595/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestDownRight.gif "image:64GestDownRight.gif") |
| sgLeftUp | [![image:64GestLeftUp.gif](http://ugc.qpic.cn/adapt/0/11ff0021-a3f6-e3e4-d242-d07c81e8ecc9/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestLeftUp.gif "image:64GestLeftUp.gif") |
| sgLeftDown | [![image:64GestLeftDown.gif](http://ugc.qpic.cn/adapt/0/7f59f3ab-6a4c-80f0-9054-44dc71f80316/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestLeftDown.gif "image:64GestLeftDown.gif") |
| sgRightUp | [![image:64GestRightUp.gif](http://ugc.qpic.cn/adapt/0/17bd67ff-0d90-3034-e7a8-725671cb8c5d/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestRightUp.gif "image:64GestRightUp.gif") |
| sgRightDown | [![image:64GestRightDown.gif](http://ugc.qpic.cn/adapt/0/b5dd788d-77c4-a364-403a-399fb92d3197/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestRightDown.gif "image:64GestRightDown.gif") |
| sgUpDown | [![image:64GestUpDown.gif](http://ugc.qpic.cn/adapt/0/a54d05df-50b1-af39-5b47-cbc853be6293/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestUpDown.gif "image:64GestUpDown.gif") |
| sgDownUp | [![image:64GestDownUp.gif](http://ugc.qpic.cn/adapt/0/d0896594-17f2-bd01-676c-d2675a919d8c/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestDownUp.gif "image:64GestDownUp.gif") |
| sgLeftRight | [![image:64GestLeftRight.gif](http://ugc.qpic.cn/adapt/0/249f44e5-7d3b-c5ee-ddb6-33bb51334ff8/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestLeftRight.gif "image:64GestLeftRight.gif") |
| sgRightLeft | [![image:64GestRightLeft.gif](http://ugc.qpic.cn/adapt/0/f36e3b9b-6daf-f869-c26c-6806d01b10cb/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestRightLeft.gif "image:64GestRightLeft.gif") |
| sgUpLeftLong | [![image:64GestUpLeftLong.gif](http://ugc.qpic.cn/adapt/0/2766eaf5-0589-8e9c-d11c-2a29c8d1124a/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestUpLeftLong.gif "image:64GestUpLeftLong.gif") |
| sgUpRightLong | [![image:64GestUpRightLong.gif](http://ugc.qpic.cn/adapt/0/5b7fedd1-1d65-8e87-e0f3-c31cabebb45b/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestUpRightLong.gif "image:64GestUpRightLong.gif") |
| sgDownLeftLong | [![image:64GestDownLeftLong.gif](http://ugc.qpic.cn/adapt/0/c7215f52-94dd-3de5-e0c7-ddacb143f8a2/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestDownLeftLong.gif "image:64GestDownLeftLong.gif") |
| sgDownRightLong | [![image:64GestDownRightLong.gif](http://ugc.qpic.cn/adapt/0/d5667757-8b6f-01ba-b531-abf5cf826a27/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestDownRightLong.gif "image:64GestDownRightLong.gif") |
| sgScratchout | [![image:64GestScratchOut.gif](http://ugc.qpic.cn/adapt/0/714af748-86a9-a8f4-47bb-e17c4e107f93/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestScratchOut.gif "image:64GestScratchOut.gif") |
| sgTriangle | [![image:64GestTriangle.gif](http://ugc.qpic.cn/adapt/0/67f3cf32-6891-811c-e7c3-ea8b2dc3da32/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestTriangle.gif "image:64GestTriangle.gif") |
| sgSquare | [![image:64GestSquare.gif](http://ugc.qpic.cn/adapt/0/1c130192-db0f-ed6f-1739-bea106a36fab/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestSquare.gif "image:64GestSquare.gif") |
| sgCheck | [![image:64GestCheck.gif](http://ugc.qpic.cn/adapt/0/369efecc-cbc7-fac6-7ffb-da04ccf6e818/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestCheck.gif "image:64GestCheck.gif") |
| sgCurlicue | [![image:64GestCurlicue.gif](http://ugc.qpic.cn/adapt/0/c52e72ca-60aa-7f3c-d286-4cd28d54e4a5/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestCurlicue.gif "image:64GestCurlicue.gif") |
| sgDoubleCurlicue | [![image:64GestDoubleCurlicue.gif](http://ugc.qpic.cn/adapt/0/1d4daa2b-332c-fe46-d16d-39dcf723a325/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestDoubleCurlicue.gif "image:64GestDoubleCurlicue.gif") |
| sgCircle | [![image:64GestCircle.gif](http://ugc.qpic.cn/adapt/0/b266f425-b2df-e5fc-515a-91f9a3b2fa91/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestCircle.gif "image:64GestCircle.gif") |
| sgDoubleCircle | [![image:64GestDoubleCircle.gif](http://ugc.qpic.cn/adapt/0/e0cbfd97-bf57-fe4d-96a7-9b17ec7d1362/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestDoubleCircle.gif "image:64GestDoubleCircle.gif") |
| sgSemiCircleLeft | [![image:64GestSemiCircleLeft.gif](http://ugc.qpic.cn/adapt/0/4bdd6a84-d294-97de-1181-f092fe3b9751/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestSemiCircleLeft.gif "image:64GestSemiCircleLeft.gif") |
| sgSemiCircleRight | [![image:64GestSemiCircleRight.gif](http://ugc.qpic.cn/adapt/0/9beafd36-fdf1-a970-8ad1-db68c7bed324/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestSemiCircleRight.gif "image:64GestSemiCircleRight.gif") |
| sgChevronUp | [![image:64GestChevronUp.gif](http://ugc.qpic.cn/adapt/0/142f614f-a966-6d1d-c1ac-10c83bf1af4a/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestChevronUp.gif "image:64GestChevronUp.gif") |
| sgChevronDown | [![image:64GestChevronDown.gif](http://ugc.qpic.cn/adapt/0/eecdc344-2e66-c2e8-2e3a-2f6613b2c54b/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestChevronDown.gif "image:64GestChevronDown.gif") |
| sgChevronLeft | [![image:64GestChevronLeft.gif](http://ugc.qpic.cn/adapt/0/2e47854a-2bc5-6034-63c8-a921f204f72a/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestChevronLeft.gif "image:64GestChevronLeft.gif") |
| sgChevronRight | [![image:64GestChevronRight.gif](http://ugc.qpic.cn/adapt/0/44eae66c-8bc7-1e5f-2f05-d87bc8a38c2a/800?pt=0&ek=1&kp=1&sce=0-12-12 "Delphi-XE5-手势操作-Gestures-使用方法")](https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdocwiki.embarcadero.com%2FRADStudio%2Fen%2FFile%3A64GestChevronRight.gif "image:64GestChevronRight.gif")
|
- 1.制作Android Splash启动界面
- 2.delphi之完美Splash方案
- 3. Android实例-解决虚拟键盘遮挡问题
- 0.Android开发小技巧
- 设 置 您 的 开 发 环 境 Windows PC(Android)
- Delphi XE控件
- 手机屏幕自适应程序问题
- 手势操作
- delphi xeandroid对硬件操作
- Datasnap
- Delphi XE 10 跨平台三层数据库应用教程
- 开发数据库三层应用的DataSnap
- ListView
- delphi xe10之控件 listview 的强大功能
- FMX.TListView的基本用法
- 初探ListView 的使用方法
- Delphi 常用控件之TlistView总结
- ListView基本用法大全
- android实现透明度可以调整的对话框
- android 获取网络状态
- FMXUI
- FMXUI - ListView用法简介