multi-touch

When does a touchesBegan become a touchesMoved?

扶醉桌前 提交于 2019-11-27 21:15:27
问题 When you drag a finger across the iPhone touchscreen, it generates touchesMoved events at a nice, regular 60Hz. However, the transition from the initial touchesBegan event to the first touchesMoved is less obvious: sometimes the device waits a while. What's it waiting for? Larger time/distance deltas? More touches to lump into the event? Does anybody know? Importantly , this delay does not happen with subsequent fingers, which puts the first touch at a distinct disadvantage. It's very

Android Multitouch - Possible to test in emulator?

烈酒焚心 提交于 2019-11-27 20:37:41
问题 I recently discovered that the Android 2.0 SDK supports multitouch through new functions in the MotionEvent class. You can specify a pointer index when retrieving touch properties, and in cases where multiple fingers are on the screen there should be multiple pointers provided. Unfortunately, I only have a G1 to test on and it's running Android 1.5 and not 2.0. Is there any way to test multitouch without a 2.0 device? In the iPhone simulator, you can hold down option and shift option to

android: difference between ACTION_UP and ACTION_POINTER_UP

南楼画角 提交于 2019-11-27 17:42:23
from the android doc alone i dont really understand the difference between ACTION_UP and ACTION_POINTER_UP. http://developer.android.com/reference/android/view/MotionEvent.html#ACTION_DOWN basically i want to capture the event when one finger is released from the screen (even if another one may still be touching it) thanks! I believe it stemmed from Multi-touch being added in, ACTION_UP has been in since API Level 1, but ACTION_POINTER_UP was added in API Level 5 when multi-touch was added. The result you get will depend on which method you are calling, getAction() would return ACTION_UP

Android multitouch! hack anyone?

不打扰是莪最后的温柔 提交于 2019-11-27 16:23:32
问题 I have to let this slip for now as a purely academic issue but i would very much like to see a solution in near time. Due to the way that Android handles multitouch you can (as i see it) only trap the event in a single view. I've tried an hack for this envolving a container layout that intercepts the events sees what View it belongs by seeing the coords and changing the action itself so that it seems to the component that it's a single touch event. I compose such events and then route it to

How to disable pinch in Android MapView

这一生的挚爱 提交于 2019-11-27 16:21:19
How can you disable pinch or multitouch functionality in an Android MapView? It took me a little time but I have a solution for this. What I did is stop the event propagation if more than one finger is touching the screen. mapView.setOnTouchListener(new OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { if(event.getPointerCount() > 1) { return true; } return false; } }); Disable all Gestures: mapView.getMap().getUiSettings().setAllGesturesEnabled(false); Disable just Zoom mapView.getMap().getUiSettings().setZoomControlsEnabled(false); final UiSettings uiSettings = map

How to code for multitouch

放肆的年华 提交于 2019-11-27 12:33:12
问题 So I'm developing an application that must handle multitouch. Basically I want single touch for rotating ( this is no problem ). And multitouch for scrolling. I have the basic code in, but I'm having problems when the shift from single to multitouch, and vice verca, occur. Basically the movement will jolt because the median position of the multitouch ( two fingers ) and the absolute position of the single finger are at a distance. So if I have two fingers on the screen, they make up a median

pointerIndex out of range Android multitouch

安稳与你 提交于 2019-11-27 12:04:19
I have a touch event exception that is causing my game to crash on tablets (or more specifically, honeycomb)... My game works fine on my phone and I haven't heard of this happening to anyone that isn't running Android 3.0 or higher. Here is the relevant log info... E/AndroidRuntime(26487): java.lang.IllegalArgumentException: pointerIndex out of range E/AndroidRuntime(26487): at android.view.MotionEvent.nativeGetAxisValue(Native Method) E/AndroidRuntime(26487): at android.view.MotionEvent.getX(MotionEvent.java:1549) E/AndroidRuntime(26487): at kieran.android.asteroids.GameUI.onTouchEvent(GameUI

Android : Multi touch and TYPE_SYSTEM_OVERLAY

末鹿安然 提交于 2019-11-27 11:15:54
I am trying to get multiple touch events on a system overlay view, but am only receiving the MotionEvent.ACTION_OUTSIDE event. Is there any possible way of getting multiple touch events on a system overlay? Any examples or links would be very helpful. To create an overlay view, when setting up the LayoutParams you need to set the type to TYPE_SYSTEM_OVERLAY and use the flag FLAG_WATCH_OUTSIDE_TOUCH . This presents a problem because as the Android documentation states: you will not receive the full down/move/up gesture, only the location of the first down as an ACTION_OUTSIDE . In order to

Extending Functionality of Magic Mouse: Do I Need a kext?

余生长醉 提交于 2019-11-27 11:03:20
I recently purchased a Magic Mouse. It is fantastic and full of potential. Unfortunately, it is seriously hindered by the software support. I want to fix that. I have done quite a lot of research and these are my findings regarding the event chain thus far: The Magic Mouse sends full multitouch events to the system. Multitouch events are processed in the MultitouchSupport.framework (Carbon) The events are interpreted in the framework and sent up to the system as normal events When you scroll with one finger it sends actual scroll wheel events. When you swipe with two fingers it sends a swipe

UIPinchGestureRecognizer position the pinched view between the two fingers

时光总嘲笑我的痴心妄想 提交于 2019-11-27 10:41:13
I successfully implemented a pinch a zoom of a view. However, the view doesn't position itself where I wished it to be. For the stackoverflowers with an iPad, I would like my view to be centered like on the iPad Photos.app : when you pinch&zoom on an album, the photos present themselves in a view that is expanding. This view is approximately centered with the top right hand corner on the first finger and the bottom left hand finger on the other finger. I mixed it with a pan recognizer, but this way the user always has to pinch, and then pan to adjust. Here are so graphic explanation, I could