gesture-recognition

GestureDetector.SimpleOnGestureListener and GestureDetectorCompat don't work. What's wrong with my code?

给你一囗甜甜゛ 提交于 2019-12-05 20:17:36
问题 I'm following Detecting common gestures guide. I have linked to android-support-v4.jar library to get GestureDetectorCompat , and my code seems exactly the same as in the guide, except I'm detecting gestures in my custom view rather than in activity: public class MyGlView extends GLSurfaceView { private GestureDetectorCompat m_gestureDetector = null; public MyGlView(Context context, AttributeSet attrs) { super(context, attrs); init(context); } public MyGlView(Context context) { super(context)

UIgestureRecognizer in a view inside a UIScrollView

孤街浪徒 提交于 2019-12-05 05:36:42
Has anyone managed to get a UIGestureRecognizer to work on a UIView that is a subview of a UIScrollView? My callbacks never seems to get called. As a simple example, I want to have a paging scrollview and on the third page listen for a tap with a UITapGestureRecognizer. However I can not get it to work. Here's how I would do it: self.scrollView = [[[UIScrollView alloc] initWithFrame:self.view.frame] autorelease]; self.scrollView.pagingEnabled = YES; self.scrollView.contentSize = CGSizeMake(self.section1ScrollView.frame.size.width * 3, self.scrollView.frame.size.height); //3 pages UIImageView

How to track ONE person with Kinect (trackingID)

自闭症网瘾萝莉.ら 提交于 2019-12-05 02:47:22
I would like to track the first person, and use this person's right hand to navigate in the application that I made. I can take over the cursor, now I just want only one person being tracked. So basically when one person is navigating in the program, and there are people walking behind him or are looking with this guy, if they move, the kinect shouldn't recognise anyone else. How can I implement this, I know it's something with the trackingId but what? :s foreach (SkeletonData s in allSkeletons.Skeletons) { if (s.TrackingState == SkeletonTrackingState.Tracked) { if (s.TrackingID == 0) {

how to detect this specific movement gesture via sensors?

泪湿孤枕 提交于 2019-12-05 02:28:11
问题 I'm working on an Android project. it's goal is to detect predefined movement gesture of the device. if the device rotates 45 degrees over an axis(X,Y or Z) and then rotates back to its first position( the first and second positions are not going to be accurate, I mean if it was rotated 50 degrees instead of 45, not important !!!)then the gesture has happened and the app should detect it. I tried to do that using Accelerometer and Magnetic sensors of device to continually monitor the

How do I chain two UIGestureRecognizers together?

那年仲夏 提交于 2019-12-04 19:07:59
问题 What I would like to do is to detect a swipe gesture followed by a pan gesture as part of the same touch sequence. So the user first swipes an object to carry out an action, then, while keeping their finger on the screen, moves up/down to propagate the action to surrounding objects. I have a swipe gesture recognizer and a pan gesture recognizer. It seems to me that the ideal way to make them behave the way I want is to do this: [myPanGestureRecognizer requireGestureRecognizerToSucceed

Detect user's gesture such as swipe

浪子不回头ぞ 提交于 2019-12-04 18:48:43
问题 I am using phonegap for build android apps. I would like to detect user's gesture such as a user's swipe. Is there an event i can call from javascript? Thanks! 回答1: I use a JavaScript framework called xui (homepage) that has a similar API to jQuery. You can use this framework coupled with the swipe plugin to get access to easy gesture events. See the swipe/ directory under that repository for the code and example (specifically under index.html). A brief example: x$('body').swipe(function(e,

Can you make custom events with UIControlEventApplicationReserved?

陌路散爱 提交于 2019-12-04 10:58:28
问题 I have written a subclass of UIControl that tracks a number of gestures that are of interest to me. In the documentation for the UIControlEvents enumeration, it says that there is a range of event numbers called UIControlEventApplicationReserved that is "available for application use." Does this mean that I am free to use this range of numbers for my own custom events? If so, can someone please tell me how to fire events? The obvious way I can think of to do it is this: enum { ...

Two-finger rotation gesture on the iPhone?

倾然丶 夕夏残阳落幕 提交于 2019-12-04 08:45:43
问题 I'm working on an iPhone app with a lot of different gesture inputs that you can do. Currently there is single finger select / drag, two finger scroll, and two finger pinch zoom-in / zoom-out. I want to add in two finger rotation (your fingers rotate a point in between them), but I can't figure out how to get it to work right. All the other gestures were linear so they were only a matter of using the dot or cross product, pretty much. I'm thinking I've got to store the slope between the

Kinect 3D gesture recognition based on skeleton movements - What libraries exist?

青春壹個敷衍的年華 提交于 2019-12-04 07:24:46
What gesture recognition libraries (if any) exist for the Kinect? Right now I'm using OpenNI to record skeleton movements but am not sure how to go from that to triggering discrete actions. My problem might be as simple as pose detection but it could also be as complicated as time based movements (ie. detect when they are moving their hand in a circle) depending on how difficult that is. The examples that I've seen for pose detection have been very ad-hoc - is this because a generic algorithm is difficult to do right? The NITE library (on top of OpenNI) has classes for detecting swipe and

Swipe detection in any angle

早过忘川 提交于 2019-12-04 07:14:23
Is there any way I can detect swipe in iPhone in any angle? UISwipeGestureRecognizer seems to have only 4 directions. If I swipe like this: \ \ \ X I want it to give me something like 60 degrees and not just down like the UISwipeGestureRecognizer . How can I do this? You can use a UIPanGestureRecognizer . When you detect the Ended state you can get the velocity. The velocity is broken into x and y components. You can use the x and y components to calculate the slope, m. m = ∆y / ∆x The angle of the line, 𝛳, defined by the slope, m, relative to the x axis is defined by: 𝛳 = arctan(m) Something