Android
android.view
public static class

android.view.GestureDetector.SimpleOnGestureListener

java.lang.Object
android.view.GestureDetector.SimpleOnGestureListener GestureDetector.OnGestureListener

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.

Summary

Public Constructors

            GestureDetector.SimpleOnGestureListener()

Public Methods

          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
Methods inherited from interface android.view.GestureDetector.OnGestureListener

Details

Public Constructors

public GestureDetector.SimpleOnGestureListener()

Public Methods

public boolean onDown(MotionEvent e)

Notified when a tap occurs with the down MotionEvent that triggered it. This will be triggered immediately for every down event. All other events should be preceded by this.

public 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. The calculated velocity is supplied along the x and y axis in pixels per second.

public void onLongPress(MotionEvent e)

Notified when a long press occurs with the initial on down MotionEvent that trigged it.

public 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. The distance in x and y is also supplied for convenience.

public void onShowPress(MotionEvent e)

The user has performed a down MotionEvent 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.

public boolean onSingleTapUp(MotionEvent e)

Notified when a tap occurs with the up MotionEvent that triggered it.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48