Code example for GestureDetector

Methods: setIsLongpressEnabled

0
     * Constructor 
     * @param context the current context 
     * @param listener the scrolling listener 
     */ 
    public WheelScroller(Context context, ScrollingListener listener) {
        gestureDetector = new GestureDetector(context, gestureListener);
        gestureDetector.setIsLongpressEnabled(false);
         
        scroller = new Scroller(context);
 
        this.listener = listener;
        this.context = context;
    } 
     
    /** 
     * Set the the specified scrolling interpolator 
     * @param interpolator the interpolator 
     */ 
    public void setInterpolator(Interpolator interpolator) {
        scroller.forceFinished(true);
        scroller = new Scroller(context, interpolator);