public class MultiTouchController<T> extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
MultiTouchController.MultiTouchObjectCanvas<T> |
static class |
MultiTouchController.PointInfo
A class that packages up all MotionEvent information with all derived multitouch information (if available)
|
static class |
MultiTouchController.PositionAndScale
A class that is used to store scroll offsets and scale information for objects that are managed by the multitouch controller
|
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG
Generate tons of log entries for debugging
|
static int |
MAX_TOUCH_POINTS
The max number of touch points that can be present on the screen at once
|
static boolean |
multiTouchSupported |
(package private) MultiTouchController.MultiTouchObjectCanvas<T> |
objectCanvas |
Constructor and Description |
---|
MultiTouchController(MultiTouchController.MultiTouchObjectCanvas<T> objectCanvas)
Constructor that sets handleSingleTouchEvents to true
|
MultiTouchController(MultiTouchController.MultiTouchObjectCanvas<T> objectCanvas,
boolean handleSingleTouchEvents)
Full constructor
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
getHandleSingleTouchEvents()
Whether to handle single-touch events/drags before multi-touch is initiated or not; if not, they are handled by subclasses.
|
int |
getMode() |
boolean |
isPinching()
Indicate if we are in the middle of a pinch action or not.
|
boolean |
onTouchEvent(MotionEvent event)
Process incoming touch events
|
protected void |
setHandleSingleTouchEvents(boolean handleSingleTouchEvents)
Whether to handle single-touch events/drags before multi-touch is initiated or not; if not, they are handled by subclasses.
|
public static final int MAX_TOUCH_POINTS
public static final boolean DEBUG
MultiTouchController.MultiTouchObjectCanvas<T> objectCanvas
public static final boolean multiTouchSupported
public MultiTouchController(MultiTouchController.MultiTouchObjectCanvas<T> objectCanvas)
public MultiTouchController(MultiTouchController.MultiTouchObjectCanvas<T> objectCanvas, boolean handleSingleTouchEvents)
protected void setHandleSingleTouchEvents(boolean handleSingleTouchEvents)
protected boolean getHandleSingleTouchEvents()
public boolean onTouchEvent(MotionEvent event)
public boolean isPinching()
public int getMode()