简体   繁体   English

我如何在android中实现顺时针和逆时针手势

[英]How Could I implement clockwise and counter clockwise gesture in android

We want to detect user finger gesture clockwise and counterclockwise like below shape.Also we want to trigger an action in clockwise motion in on 4 O'clock,and trigger an action in counterclockwise motion on 8 O'clock.我们想检测用户手指的顺时针和逆时针手势,如下图所示。此外,我们想在 4 点钟触发顺时针运动的动作,并在 8 点钟触发逆时针运动的动作。

descriptions in Image图片中的描述

we found some circular detection like This link and some other but They didn't helped us.我们发现了一些循环检测,比如这个链接和其他一些,但他们没有帮助我们。 How could we achieve this in android??我们怎么能在android中实现这一点?

Also in rounded Arrow we want to detect user gesture if on it and reaches 1 turn The first arrow on, then when user reaches 2 turn the second arrow on.同样在圆形箭头中,我们希望检测用户手势是否在其上并达到 1 次打开第一个箭头,然后当用户到达 2 时打开第二个箭头。 Rounded Arrow圆形箭头

Create two imaginary arc with the same radius.创建两个具有相同半径的假想弧。 Position them as you need and maintain them for different device resolution.根据需要放置它们并针对不同的设备分辨率维护它们。

Check for the following steps:检查以下步骤:

  1. Use GestureDetector to detect the touch movement.使用 GestureDetector 检测触摸移动。
  2. Whenever the event is created first check if its within these arc bounds.每当创建事件时首先检查它是否在这些弧边界内。
  3. If yes then check for the movement if its within the same arc or not(Can create a array for saving all the touch points for a certain time period).如果是,则检查运动是否在同一弧内(可以创建一个数组以保存特定时间段内的所有接触点)。
  4. If its within same arc then finally check for the upper limit where you are supposed to increase the value如果它在同一弧内,那么最后检查您应该增加值的上限

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

相关问题 如何正确确定用户是否使用时间顺时针方向或逆时针方向拖动圆形滚轮滑块? - How do I properly determine if user is dragging my circle wheel slider Clockwise or Counter Clockwise using time? 检测手势是顺时针还是逆时针 - Detect whether a gesture was clockwise or anticlockwise Android图像/视频错误地逆时针旋转90度 - Android Image/Video incorrectly rotated 90 degrees counter clockwise 如何使 ProgressBar 逆时针移动 android - How to make a ProgressBar move in anti Clockwise android 如何在Android中顺时针和逆时针旋转图像? - how to rotate an image in clockwise and counterclockwise in android? 如何在Android上绘制逆时针圆弧? - How to draw a reverse clockwise arc on Android? Android Animation顺时针方向 - Android Animation Clockwise 如何在Android中的多个(2个或更多)手指触摸上顺时针和逆时针旋转图像? - How to rotate an image clockwise and anti-clockwise on multiple(2 and more) fingers touch in android? 如何顺时针旋转ImageView - How to rotate ImageView by clockwise 如何在android中顺时针和逆时针旋转图像(指尖旋转)? - How to rotate image clockwise and anti-clockwise in android(At finger-tip rotation)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM