org.arakhne.afc.ui.android.zoom
class TouchManager extends Object
This manager tries to detected scaling, move and click gestures and avoid to generate unecessary events.
| Modifier and Type | Field and Description |
|---|---|
static int |
INVALID_POINTER_ID
Constant that is the identifier representing of an invalid pointer
on the droid device.
|
| Constructor and Description |
|---|
TouchManager(ZoomableView view) |
| Modifier and Type | Method and Description |
|---|---|
protected ZoomableView |
getView()
Replies the view associated to this manager.
|
void |
init()
Initialize the manager.
|
byte |
onTouchEvent(android.view.MotionEvent ev)
Invoked to treat a touch event.
|
android.view.View.OnClickListener |
setOnClickListener(android.view.View.OnClickListener l)
Change the listener on click.
|
android.view.View.OnLongClickListener |
setOnLongClickListener(android.view.View.OnLongClickListener l)
Change the listener on long click.
|
public static final int INVALID_POINTER_ID
public TouchManager(ZoomableView view)
view - is the view associated to this manager.public void init()
This function must be invoked just after the construction and before any Android event.
public byte onTouchEvent(android.view.MotionEvent ev)
ev - 0x1 if the event is consumed,
0x2 if the View's touchEvent function must be invoked.protected ZoomableView getView()
public final android.view.View.OnLongClickListener setOnLongClickListener(android.view.View.OnLongClickListener l)
l - is the new listenerpublic final android.view.View.OnClickListener setOnClickListener(android.view.View.OnClickListener l)
l - is the new listenerCopyright © 2001-2013 NetEditor Developers. 
NetEditor API Documentation by NetEditor Developers is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Based on a work at www.arakhne.org/neteditor