gesture

How is google maps (web app) scaling so smooth on the iphone/ipad with the gesture/pinch?

懵懂的女人 提交于 2019-12-04 17:52:53
If you have used the Google Maps web app on your iphone or ipad you know what i am talking about. You can't see my fingers in this screen grab, but this is mid-pinch (if you will) zooming out. The detailed area was the initial map viewing area and the blurry bit outside is the extra map that has come into view mid-pinch. The pinch-to-zoom function that uses the gesture touch input scales the map currently in view live in a way that is so smooth it looks like magic. We are trying to scale images and reproduce this smooth scaling. Does anyone know how they do it? We don't know if it's a single

Detecting Swipe and Tap gestures

心已入冬 提交于 2019-12-04 17:15:27
How to detect Swipe and Tap in onTouch method? I want one of two actions to be executed when I swipe and other when I just tap. Need to know how to dell the difference between tap and swipe. Here is my code: @Override public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_MOVE) { mGestureDetector.onTouchEvent(event); } switch(event.getAction()) { case MotionEvent.ACTION_DOWN: x1 = event.getX(); y1 = event.getY(); break; case MotionEvent.ACTION_UP: x2 = event.getX(); y2 = event.getY(); float deltaX = x2 - x1; float deltaY = y2 - y1; if (Math.abs(deltaX)

Gesture character recognition

安稳与你 提交于 2019-12-04 13:17:38
问题 I use Dio dictionary , function gesture on screen get text to search Library that in Android can make to be the function of this? 回答1: I think you want something like a handwriting recognition library. It seems you want to enable the users to write something on the screen ,when app is ON and then you can convert it to text and use it. There are many existing questions which might help you find a handwriting recognition library. See: Handwriting recognition API's for android applications https

Detecting swipe gesture direction with Leap Motion

冷暖自知 提交于 2019-12-04 08:34:29
问题 I'm trying to simply get the direction of a swipe gesture with the Leap Motion using the javascript API. My code is: $(document).ready(function() { controller = new Leap.Controller("ws://localhost:6437/"); listener = new Leap.Listener(); listener.onFrame = function(controller) { var frame = controller.frame(); var hands = frame.hands(); var pointables = frame.pointables(); var gestures = frame.gestures(); $("#rotationAxis").text(pointables.length); $("#gestureDetected").text(gestures[0]); }

Get speed of a onTouch ACTION_MOVE event in Android

♀尐吖头ヾ 提交于 2019-12-04 08:20:47
问题 This should be a pretty simple thing to do. The user puts his finger on the screen and drags it around the screen. There are two events firing on onTouch: MotionEvent.ACTION_DOWN MotionEvent.ACTION_MOVE Now, how can I calculate the speed of the ACTION_MOVE gesture ? The user drags the finger slower or faster during a gesture, so I think I need to calculate the speed between two intermediate touched points: the lastTouchedPointX,lastTouchedPointY and the event.getX(),event.getY(). Has anyone

Why is my SimpleOnGestureListener not functioning?

拟墨画扇 提交于 2019-12-04 06:28:50
问题 I'm using my own GestureDetector class to detect a left|right onFling event. Everything I see looks good in my code but nothing happens...? I need the added functionality beyond my toggle button that opens|closes a navigation view in my fragments. The toggle calls on a method in my AnimationLayout class as follows: public void toggleSidebar() { if (mContent.getAnimation() != null) { return; } if (mOpened) { /* opened, make close animation */ mAnimation = new TranslateAnimation(0,

Android: Recognising Gestures when screen is locked

可紊 提交于 2019-12-04 05:30:36
问题 I am currently in the process of creating an MP3 player. In particular, the main mode of user input is in the form of (touchscreen) gestural input. I would like to add the functionality allowing users to continue interacting with the MP3 player when the screen is locked. That is, how can I get the device (A Galaxy S3 in particular if it's worth mentioning) to recognise gestures in the lock screen and "parse" them to the MP3 player? Note: by "locked" I mean when one can see the lock screen (i

Are Android app widgets (for home screen) allowed gestures?

。_饼干妹妹 提交于 2019-12-04 03:55:53
I noticed that when I swipe my finger from left to right across a home screen widget, in simulator on a AVD, Android switch to the left home screen. I was wondering if its possible to prevent this behavior and allow home screen gadgets to listen and react to finger gestures (like swipe)? Its very critical for my widget UI design. Starting with API level 11 (Android 3.0.x) you can use " android.widget.RemoteViewsService.RemoteViewsFactory " and and assign a widget to use (from docs): ListView : A view that shows items in a vertically scrolling list. For an example, see the Gmail app widget.

How can I implement gesture recognizers in OS X?

淺唱寂寞╮ 提交于 2019-12-04 02:27:34
I have done quite a bit with gesture recognizers for iOS, but I am now doing work in OS X, and I am lost. I want to duplicate the functionality that exists like in Finder where you can two-finger swipe (on your magic mouse) to go back/forward through a directory tree. I have an NSWindow based app that looks very similar to Finder. I have used apps before that allows you to build your own gesture recognizers so I know it is possible to do it, but I don't see any documentation on it. What do I need to do to implement these gestures? You can read about Handling Trackpad Events in the Cocoa Event

The GestureDetector does not work (example from android developer)

蓝咒 提交于 2019-12-04 01:16:08
I am reading the gesture in android at android developer, and following the tutorial I tried to run the following codes: public class MainActivity extends Activity implements OnGestureListener, OnDoubleTapListener { private static final String DEBUG_TAG = "Gestures"; private GestureDetectorCompat mDetector; // Called when the activity is first created. @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); View v = new RelativeLayout(this); v.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); setContentView(v);