|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.view.GestureDetector.SimpleOnGestureListener
public static class GestureDetector.SimpleOnGestureListener
A convenience class to extend when you only want to listen for a
subset of all the gestures. This implements all methods in the
GestureDetector.OnGestureListener but does nothing and return false
for all applicable methods.
| Constructor Summary | |
|---|---|
GestureDetector.SimpleOnGestureListener()
|
|
| Method Summary | |
|---|---|
boolean |
onDown(MotionEvent e)
Notified when a tap occurs with the down MotionEvent
that triggered it. |
boolean |
onFling(MotionEvent e1,
MotionEvent e2,
float velocityX,
float velocityY)
Notified of a fling event when it occurs with the initial on down MotionEvent
and the matching up MotionEvent. |
void |
onLongPress(MotionEvent e)
Notified when a long press occurs with the initial on down MotionEvent
that trigged it. |
boolean |
onScroll(MotionEvent e1,
MotionEvent e2,
float distanceX,
float distanceY)
Notified when a scroll occurs with the initial on down MotionEvent and the
current move MotionEvent. |
void |
onShowPress(MotionEvent e)
The user has performed a down MotionEvent and not performed
a move or up yet. |
boolean |
onSingleTapUp(MotionEvent e)
Notified when a tap occurs with the up MotionEvent
that triggered it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GestureDetector.SimpleOnGestureListener()
| Method Detail |
|---|
public boolean onSingleTapUp(MotionEvent e)
GestureDetector.OnGestureListenerMotionEvent
that triggered it.
onSingleTapUp in interface GestureDetector.OnGestureListenere - The up motion event that completed the first tap
public void onLongPress(MotionEvent e)
GestureDetector.OnGestureListenerMotionEvent
that trigged it.
onLongPress in interface GestureDetector.OnGestureListenere - The initial on down motion event that started the longpress.
public boolean onScroll(MotionEvent e1,
MotionEvent e2,
float distanceX,
float distanceY)
GestureDetector.OnGestureListenerMotionEvent and the
current move MotionEvent. The distance in x and y is also supplied for
convenience.
onScroll in interface GestureDetector.OnGestureListenere1 - The first down motion event that started the scrolling.e2 - The move motion event that triggered the current onScroll.distanceX - The distance along the X axis that has been scrolled since the last
call to onScroll. This is NOT the distance between e1
and e2.distanceY - The distance along the Y axis that has been scrolled since the last
call to onScroll. This is NOT the distance between e1
and e2.
public boolean onFling(MotionEvent e1,
MotionEvent e2,
float velocityX,
float velocityY)
GestureDetector.OnGestureListenerMotionEvent
and the matching up MotionEvent. The calculated velocity is supplied along
the x and y axis in pixels per second.
onFling in interface GestureDetector.OnGestureListenere1 - The first down motion event that started the fling.e2 - The move motion event that triggered the current onFling.velocityX - The velocity of this fling measured in pixels per second
along the x axis.velocityY - The velocity of this fling measured in pixels per second
along the y axis.
public void onShowPress(MotionEvent e)
GestureDetector.OnGestureListenerMotionEvent and not performed
a move or up yet. This event is commonly used to provide visual
feedback to the user to let them know that their action has been
recognized i.e. highlight an element.
onShowPress in interface GestureDetector.OnGestureListenere - The down motion eventpublic boolean onDown(MotionEvent e)
GestureDetector.OnGestureListenerMotionEvent
that triggered it. This will be triggered immediately for
every down event. All other events should be preceded by this.
onDown in interface GestureDetector.OnGestureListenere - The down motion event.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||