gestures

Weird onScroll event triggered after onScale event

随声附和 提交于 2019-12-05 06:05:50
I have an app that uses a SimpleOnScaleGestureListener and a SimpleOnGestureListener together. Whenever I do a pinch zoom I get the expected onScale's, but when I lift off I see a weird onScroll that has a start position from the beginning of the pinch zoom and an end position from the end of the pinch zoom. My question is, can I prevent the bogus onScroll? Here's the code: @Override public boolean onTouchEvent(MotionEvent event) { // Log every event. Log.d(TAG, Here.at() + String.format("Event: %d, Time: %d X: %f, Y: %f", event.getAction(), event.getEventTime(), event.getX(), event.getY() ));

Delphi 2010 Tablet PC Support

こ雲淡風輕ζ 提交于 2019-12-05 02:25:56
问题 One of the big selling points I saw when I had to buy delphi for my job was the ability to support tablet pc's. Now the client of the company where I work want to use a tablet pc. I've been trying hard to find examples of delphi with tablet pc but I don't find any. Does anybody has experience with it? Any kind of tutorials or examples? I don't seem to be able even to bring a virtual keyboard when a component gain focus and hide it when it loses it. 回答1: Delphi 2010 introduced some nice touch

Disable pinch to zoom in IE10

强颜欢笑 提交于 2019-12-04 23:06:48
In IE10 touch mode I wish to make only a certain part of the page zoomable. The rest should not be. I found this: http://msdn.microsoft.com/en-US/library/ie/hh772044.aspx and tried to set -ms-touch-action: none to my body and html tags. However I can still zoom. Did I miss something? cmplieger Found the solution: -ms-content-zooming: none | zoom For me this CSS code work html { -ms-content-zooming: none; -ms-touch-action: pan-x pan-y; } I am using this code for disabling pinch and double tap zoom on windows tablet, I.E 10 Try to add this in your Head area: <meta name="viewport" content="width

How to make a combined gestures?

折月煮酒 提交于 2019-12-04 18:56:09
I want to ask some interesting thing. I want my app can action when a custom combined gestures occur. For example: call a action(/method) when user swipe left, top, left without the finger leave on the screen. How can i make this custom gesture? and second question is can i swipe upper left( like " / " this direction)? How to make this gesture? can anyone one help me? please! thanks Well, conceptually you need to subclass UIGestureRecognizer, do some position tracking, and make use of the fact that after importing UIGestureRecognizerSubclass.h the gestures state property becomes read/write to

ontouchevent gesture scrolling issues

匆匆过客 提交于 2019-12-04 15:31:01
I'm using the following Javascript to create ontouchstart/move/end callbacks on div elements for an iOS web app. The only problem at the moment is that when you try to scroll up and down the page, it triggers the ontouchstart element and changes the CSS of the div. I want the CSS of the div to change only when a user selects the item. I'm fairly basic with Javascript but if anyone knows any way of getting the Javascript to only trigger when a user is selecting an item it would be greatly appreciated! Thanks! TC Javascript: function onclickCallback( event ) { } function ontouchstartCallback(

Algorithm to recognise mouse movements

给你一囗甜甜゛ 提交于 2019-12-04 12:48:46
Am wondering if there has been any research/algorthms which specify the amount of deviation of the mouse while recognizing characters like say "?" drawn using the mouse. Something a sort of optical character recognition, but probably a simpler version. Is there some algorithm using which I can say that a question mark drawn by the user is really a question mark and not something else with some amount of accuracy ofcourse. Something like what windows tablet software allows (while writing with the tablet stylus). Thank you for your time. Mouse gestures recognition Dynamic Time Warping is the

I can't make swipe gesture work for me in Appium using Java

折月煮酒 提交于 2019-12-04 11:13:41
I can't made Swipe action work. I did browsed through the web for a few days and found many similar questions but there is no working answer. Also I have tried TouchAction class, doesn't work as well. I have Appium Version 1.4.13 (Draco) and using Java, TestNG framework. btw I made scrolling work using (you can use the same logic as a pull to refresh) here is code sample. public void scrollUp() { JavascriptExecutor js = (JavascriptExecutor) getDriver(); HashMap<String, String> scrollObject = new HashMap<String,String(); scrollObject.put("direction", "up"); scrollObject.put("element",

Tinder style drag gesture and drop with Javascript?

天涯浪子 提交于 2019-12-04 08:11:17
问题 I'm trying to figure out what libraries I can use for a Tinder-style drag and drop gesture that only uses Javascript. Needs to create an HTML element that responds to a drag gesture.. When touched and held, allows the element to follow the user's finger around. When the user removes his finger, the element either: animates back to its original position if the element is over a specified drop zone when it is released, the element will animate and disappear and there needs to be some kind of

-[NSResponder swipeWithEvent:] not called

瘦欲@ 提交于 2019-12-04 04:10:32
I am writing an application targeting OS X Lion and Snow Leopard. I have a view that I want to have respond to swipe events. My understanding is that three-finger swipes will call -[NSResponder swipeWithEvent:] if that method is implemented in my custom view. I have already looked at this question and corresponding answers, and tried the following modified stub implementation of Oscar Del Ben's code: @implementation TestView - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { // Initialization code here. } return self; } - (void)drawRect:(NSRect)dirtyRect { [

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

﹥>﹥吖頭↗ 提交于 2019-12-04 03:06:56
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); init(context); } private void init(Context context) { if (m_gestureDetector == null) m