|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.metalev.multitouch.controller.MultiTouchController<T>
public class MultiTouchController<T>
A class that simplifies the implementation of multitouch in applications. Subclass this and read the fields here as needed in subclasses.
Nested Class Summary | |
---|---|
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 |
Field Summary | |
---|---|
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
|
Constructor Summary | |
---|---|
MultiTouchController(MultiTouchController.MultiTouchObjectCanvas<T> objectCanvas)
Constructor that sets handleSingleTouchEvents to true |
|
MultiTouchController(MultiTouchController.MultiTouchObjectCanvas<T> objectCanvas,
boolean handleSingleTouchEvents)
Full constructor |
Method Summary | |
---|---|
protected boolean |
getHandleSingleTouchEvents()
Whether to handle single-touch events/drags before multi-touch is initiated or not; if not, they are handled by subclasses. |
boolean |
isPinching()
Indicate if we are in the middle of a pinch action or not. |
boolean |
onTouchEvent(android.view.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_TOUCH_POINTS
public static final boolean DEBUG
public static final boolean multiTouchSupported
Constructor Detail |
---|
public MultiTouchController(MultiTouchController.MultiTouchObjectCanvas<T> objectCanvas)
public MultiTouchController(MultiTouchController.MultiTouchObjectCanvas<T> objectCanvas, boolean handleSingleTouchEvents)
Method Detail |
---|
protected void setHandleSingleTouchEvents(boolean handleSingleTouchEvents)
protected boolean getHandleSingleTouchEvents()
public boolean onTouchEvent(android.view.MotionEvent event)
public boolean isPinching()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |