简体   繁体   English

如何添加自定义手势Android Studio?

[英]How to add custom gesture android studio?

So there is my question. 所以这是我的问题。 I would like to know how to add custom pattern for a gesture in Android Studio, just like: draw a tick to continue or something like that. 我想知道如何在Android Studio中为手势添加自定义模式,就像:画一个勾号以继续之类。

Thanks in advance. 提前致谢。

I don't think this is possible as you have to use the MotionEvent enum. 我认为这是不可能的,因为您必须使用MotionEvent枚举。 An example of how this is done is shown here 此处显示了如何完成此操作的示例

You'd have to look at extending this or using movement tracking to work out things like velocity of the motion, there's documentation here but it doesn't look elementary. 您必须考虑扩展此范围或使用运动跟踪来计算运动速度之类的内容,这里有文档但看起来并不基本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM