android.view.GestureDetector.OnGestureListener Java Examples

The following examples show how to use android.view.GestureDetector.OnGestureListener. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GestureDetectorCompat.java    From letv with Apache License 2.0 5 votes vote down vote up
public GestureDetectorCompatImplBase(Context context, OnGestureListener listener, Handler handler) {
    if (handler != null) {
        this.mHandler = new GestureHandler(handler);
    } else {
        this.mHandler = new GestureHandler();
    }
    this.mListener = listener;
    if (listener instanceof OnDoubleTapListener) {
        setOnDoubleTapListener((OnDoubleTapListener) listener);
    }
    init(context);
}
 
Example #2
Source File: GestureDetectorCompat.java    From guideshow with MIT License 5 votes vote down vote up
/**
 * Creates a GestureDetector with the supplied listener.
 * You may only use this constructor from a UI thread (this is the usual situation).
 * @see android.os.Handler#Handler()
 *
 * @param context the application's context
 * @param listener the listener invoked for all the callbacks, this must
 * not be null.
 * @param handler the handler to use
 *
 * @throws NullPointerException if {@code listener} is null.
 */
public GestureDetectorCompatImplBase(Context context, OnGestureListener listener,
        Handler handler) {
    if (handler != null) {
        mHandler = new GestureHandler(handler);
    } else {
        mHandler = new GestureHandler();
    }
    mListener = listener;
    if (listener instanceof OnDoubleTapListener) {
        setOnDoubleTapListener((OnDoubleTapListener) listener);
    }
    init(context);
}
 
Example #3
Source File: GestureDetectorCompat.java    From V.FlyoutTest with MIT License 5 votes vote down vote up
/**
 * Creates a GestureDetector with the supplied listener.
 * You may only use this constructor from a UI thread (this is the usual situation).
 * @see android.os.Handler#Handler()
 *
 * @param context the application's context
 * @param listener the listener invoked for all the callbacks, this must
 * not be null.
 * @param handler the handler to use
 *
 * @throws NullPointerException if {@code listener} is null.
 */
public GestureDetectorCompatImplBase(Context context, OnGestureListener listener,
        Handler handler) {
    if (handler != null) {
        mHandler = new GestureHandler(handler);
    } else {
        mHandler = new GestureHandler();
    }
    mListener = listener;
    if (listener instanceof OnDoubleTapListener) {
        setOnDoubleTapListener((OnDoubleTapListener) listener);
    }
    init(context);
}
 
Example #4
Source File: GestureDetectorCompat.java    From android-recipes-app with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a GestureDetector with the supplied listener.
 * You may only use this constructor from a UI thread (this is the usual situation).
 * @see android.os.Handler#Handler()
 *
 * @param context the application's context
 * @param listener the listener invoked for all the callbacks, this must
 * not be null.
 * @param handler the handler to use
 *
 * @throws NullPointerException if {@code listener} is null.
 */
public GestureDetectorCompatImplBase(Context context, OnGestureListener listener,
        Handler handler) {
    if (handler != null) {
        mHandler = new GestureHandler(handler);
    } else {
        mHandler = new GestureHandler();
    }
    mListener = listener;
    if (listener instanceof OnDoubleTapListener) {
        setOnDoubleTapListener((OnDoubleTapListener) listener);
    }
    init(context);
}
 
Example #5
Source File: GestureDetectorCompat.java    From adt-leanback-support with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a GestureDetector with the supplied listener.
 * You may only use this constructor from a UI thread (this is the usual situation).
 * @see android.os.Handler#Handler()
 *
 * @param context the application's context
 * @param listener the listener invoked for all the callbacks, this must
 * not be null.
 * @param handler the handler to use
 *
 * @throws NullPointerException if {@code listener} is null.
 */
public GestureDetectorCompatImplBase(Context context, OnGestureListener listener,
        Handler handler) {
    if (handler != null) {
        mHandler = new GestureHandler(handler);
    } else {
        mHandler = new GestureHandler();
    }
    mListener = listener;
    if (listener instanceof OnDoubleTapListener) {
        setOnDoubleTapListener((OnDoubleTapListener) listener);
    }
    init(context);
}
 
Example #6
Source File: GestureDetectorCompat.java    From CodenameOne with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates a GestureDetector with the supplied listener.
 * You may only use this constructor from a UI thread (this is the usual situation).
 * @see android.os.Handler#Handler()
 *
 * @param context the application's context
 * @param listener the listener invoked for all the callbacks, this must
 * not be null.
 * @param handler the handler to use
 *
 * @throws NullPointerException if {@code listener} is null.
 */
public GestureDetectorCompatImplBase(Context context, OnGestureListener listener,
        Handler handler) {
    if (handler != null) {
        mHandler = new GestureHandler(handler);
    } else {
        mHandler = new GestureHandler();
    }
    mListener = listener;
    if (listener instanceof OnDoubleTapListener) {
        setOnDoubleTapListener((OnDoubleTapListener) listener);
    }
    init(context);
}
 
Example #7
Source File: GestureDetectorCompat.java    From Slide with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Creates a GestureDetector with the supplied listener.
 * You may only use this constructor from a UI thread (this is the usual situation).
 * @see Handler#Handler()
 *
 * @param context the application's context
 * @param listener the listener invoked for all the callbacks, this must
 * not be null.
 * @param handler the handler to use
 *
 * @throws NullPointerException if {@code listener} is null.
 */
public GestureDetectorCompatImplBase(Context context, OnGestureListener listener,
                                     Handler handler) {
    if (handler != null) {
        mHandler = new GestureHandler(handler);
    } else {
        mHandler = new GestureHandler();
    }
    mListener = listener;
    if (listener instanceof OnDoubleTapListener) {
        setOnDoubleTapListener((OnDoubleTapListener) listener);
    }
    init(context);
}
 
Example #8
Source File: GestureDetectorCompat.java    From Android-3DTouch-PeekView with MIT License 5 votes vote down vote up
/**
 * Creates a GestureDetector with the supplied listener.
 * You may only use this constructor from a UI thread (this is the usual situation).
 * @see android.os.Handler#Handler()
 *
 * @param context the application's context
 * @param listener the listener invoked for all the callbacks, this must
 * not be null.
 * @param handler the handler to use
 *
 * @throws NullPointerException if {@code listener} is null.
 */
public GestureDetectorCompatImplBase(Context context, OnGestureListener listener,
                                     Handler handler) {
    if (handler != null) {
        mHandler = new GestureHandler(handler);
    } else {
        mHandler = new GestureHandler();
    }
    mListener = listener;
    if (listener instanceof OnDoubleTapListener) {
        setOnDoubleTapListener((OnDoubleTapListener) listener);
    }
    init(context);
}
 
Example #9
Source File: GestureDetectorCompat.java    From letv with Apache License 2.0 5 votes vote down vote up
public GestureDetectorCompat(Context context, OnGestureListener listener, Handler handler) {
    if (VERSION.SDK_INT > 17) {
        this.mImpl = new GestureDetectorCompatImplJellybeanMr2(context, listener, handler);
    } else {
        this.mImpl = new GestureDetectorCompatImplBase(context, listener, handler);
    }
}
 
Example #10
Source File: GestureDetectorCompat.java    From android-recipes-app with Apache License 2.0 4 votes vote down vote up
public GestureDetectorCompatImplJellybeanMr2(Context context, OnGestureListener listener,
        Handler handler) {
    mDetector = new GestureDetector(context, listener, handler);
}
 
Example #11
Source File: GestureDetectorCompat.java    From Android-3DTouch-PeekView with MIT License 4 votes vote down vote up
public GestureDetectorCompatImplJellybeanMr2(Context context, OnGestureListener listener,
                                             Handler handler) {
    mDetector = new GestureDetector(context, listener, handler);
}
 
Example #12
Source File: GestureDetectorCompat.java    From Slide with GNU General Public License v3.0 4 votes vote down vote up
public GestureDetectorCompatImplJellybeanMr2(Context context, OnGestureListener listener,
                                             Handler handler) {
    mDetector = new GestureDetector(context, listener, handler);
}
 
Example #13
Source File: GestureDetectorCompat.java    From guideshow with MIT License 4 votes vote down vote up
public GestureDetectorCompatImplJellybeanMr2(Context context, OnGestureListener listener,
        Handler handler) {
    mDetector = new GestureDetector(context, listener, handler);
}
 
Example #14
Source File: ImageViewTouch.java    From DanDanPlayForAndroid with MIT License 4 votes vote down vote up
protected OnGestureListener getGestureListener() {
	return new GestureListener();
}
 
Example #15
Source File: GestureDetectorCompat.java    From CodenameOne with GNU General Public License v2.0 4 votes vote down vote up
public GestureDetectorCompatImplJellybeanMr2(Context context, OnGestureListener listener,
        Handler handler) {
    mDetector = new GestureDetector(context, listener, handler);
}
 
Example #16
Source File: GestureDetectorCompat.java    From letv with Apache License 2.0 4 votes vote down vote up
public GestureDetectorCompat(Context context, OnGestureListener listener) {
    this(context, listener, null);
}
 
Example #17
Source File: GestureDetectorCompat.java    From V.FlyoutTest with MIT License 4 votes vote down vote up
public GestureDetectorCompatImplJellybeanMr2(Context context, OnGestureListener listener,
        Handler handler) {
    mDetector = new GestureDetector(context, listener, handler);
}
 
Example #18
Source File: GestureDetectorCompat.java    From adt-leanback-support with Apache License 2.0 4 votes vote down vote up
public GestureDetectorCompatImplJellybeanMr2(Context context, OnGestureListener listener,
        Handler handler) {
    mDetector = new GestureDetector(context, listener, handler);
}
 
Example #19
Source File: GestureDetectorCompat.java    From letv with Apache License 2.0 4 votes vote down vote up
public GestureDetectorCompatImplJellybeanMr2(Context context, OnGestureListener listener, Handler handler) {
    this.mDetector = new GestureDetector(context, listener, handler);
}
 
Example #20
Source File: ImageViewTouch.java    From Klyph with MIT License 4 votes vote down vote up
protected OnGestureListener getGestureListener() {
	return new GestureListener();
}
 
Example #21
Source File: GestureDetectorCompat.java    From V.FlyoutTest with MIT License 3 votes vote down vote up
/**
 * Creates a GestureDetectorCompat with the supplied listener.
 * As usual, you may only use this constructor from a UI thread.
 * @see android.os.Handler#Handler()
 *
 * @param context the application's context
 * @param listener the listener invoked for all the callbacks, this must
 * not be null.
 * @param handler the handler that will be used for posting deferred messages
 */
public GestureDetectorCompat(Context context, OnGestureListener listener, Handler handler) {
    if (Build.VERSION.SDK_INT > 17) {
        mImpl = new GestureDetectorCompatImplJellybeanMr2(context, listener, handler);
    } else {
        mImpl = new GestureDetectorCompatImplBase(context, listener, handler);
    }
}
 
Example #22
Source File: GestureDetectorCompat.java    From android-recipes-app with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a GestureDetectorCompat with the supplied listener.
 * As usual, you may only use this constructor from a UI thread.
 * @see android.os.Handler#Handler()
 *
 * @param context the application's context
 * @param listener the listener invoked for all the callbacks, this must
 * not be null.
 * @param handler the handler that will be used for posting deferred messages
 */
public GestureDetectorCompat(Context context, OnGestureListener listener, Handler handler) {
    if (Build.VERSION.SDK_INT > 17) {
        mImpl = new GestureDetectorCompatImplJellybeanMr2(context, listener, handler);
    } else {
        mImpl = new GestureDetectorCompatImplBase(context, listener, handler);
    }
}
 
Example #23
Source File: GestureDetectorCompat.java    From adt-leanback-support with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a GestureDetectorCompat with the supplied listener.
 * As usual, you may only use this constructor from a UI thread.
 * @see android.os.Handler#Handler()
 *
 * @param context the application's context
 * @param listener the listener invoked for all the callbacks, this must
 * not be null.
 * @param handler the handler that will be used for posting deferred messages
 */
public GestureDetectorCompat(Context context, OnGestureListener listener, Handler handler) {
    if (Build.VERSION.SDK_INT > 17) {
        mImpl = new GestureDetectorCompatImplJellybeanMr2(context, listener, handler);
    } else {
        mImpl = new GestureDetectorCompatImplBase(context, listener, handler);
    }
}
 
Example #24
Source File: GestureDetectorCompat.java    From guideshow with MIT License 3 votes vote down vote up
/**
 * Creates a GestureDetectorCompat with the supplied listener.
 * As usual, you may only use this constructor from a UI thread.
 * @see android.os.Handler#Handler()
 *
 * @param context the application's context
 * @param listener the listener invoked for all the callbacks, this must
 * not be null.
 * @param handler the handler that will be used for posting deferred messages
 */
public GestureDetectorCompat(Context context, OnGestureListener listener, Handler handler) {
    if (Build.VERSION.SDK_INT > 17) {
        mImpl = new GestureDetectorCompatImplJellybeanMr2(context, listener, handler);
    } else {
        mImpl = new GestureDetectorCompatImplBase(context, listener, handler);
    }
}
 
Example #25
Source File: GestureDetectorCompat.java    From CodenameOne with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a GestureDetectorCompat with the supplied listener.
 * As usual, you may only use this constructor from a UI thread.
 * @see android.os.Handler#Handler()
 *
 * @param context the application's context
 * @param listener the listener invoked for all the callbacks, this must
 * not be null.
 * @param handler the handler that will be used for posting deferred messages
 */
public GestureDetectorCompat(Context context, OnGestureListener listener, Handler handler) {
    if (Build.VERSION.SDK_INT > 17) {
        mImpl = new GestureDetectorCompatImplJellybeanMr2(context, listener, handler);
    } else {
        mImpl = new GestureDetectorCompatImplBase(context, listener, handler);
    }
}
 
Example #26
Source File: GestureDetectorCompat.java    From Slide with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Creates a GestureDetectorCompat with the supplied listener.
 * As usual, you may only use this constructor from a UI thread.
 * @see Handler#Handler()
 *
 * @param context the application's context
 * @param listener the listener invoked for all the callbacks, this must
 * not be null.
 * @param handler the handler that will be used for posting deferred messages
 */
public GestureDetectorCompat(Context context, OnGestureListener listener, Handler handler) {
    if (Build.VERSION.SDK_INT > 17) {
        mImpl = new GestureDetectorCompatImplJellybeanMr2(context, listener, handler);
    } else {
        mImpl = new GestureDetectorCompatImplBase(context, listener, handler);
    }
}
 
Example #27
Source File: GestureDetectorCompat.java    From Android-3DTouch-PeekView with MIT License 3 votes vote down vote up
/**
 * Creates a GestureDetectorCompat with the supplied listener.
 * As usual, you may only use this constructor from a UI thread.
 * @see android.os.Handler#Handler()
 *
 * @param context the application's context
 * @param listener the listener invoked for all the callbacks, this must
 * not be null.
 * @param handler the handler that will be used for posting deferred messages
 */
public GestureDetectorCompat(Context context, OnGestureListener listener, Handler handler) {
    if (Build.VERSION.SDK_INT > 17) {
        mImpl = new GestureDetectorCompatImplJellybeanMr2(context, listener, handler);
    } else {
        mImpl = new GestureDetectorCompatImplBase(context, listener, handler);
    }
}
 
Example #28
Source File: GestureDetectorCompat.java    From android-recipes-app with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a GestureDetectorCompat with the supplied listener.
 * As usual, you may only use this constructor from a UI thread.
 * @see android.os.Handler#Handler()
 *
 * @param context the application's context
 * @param listener the listener invoked for all the callbacks, this must
 * not be null.
 */
public GestureDetectorCompat(Context context, OnGestureListener listener) {
    this(context, listener, null);
}
 
Example #29
Source File: GestureDetectorCompat.java    From Android-3DTouch-PeekView with MIT License 2 votes vote down vote up
/**
 * Creates a GestureDetectorCompat with the supplied listener.
 * As usual, you may only use this constructor from a UI thread.
 * @see android.os.Handler#Handler()
 *
 * @param context the application's context
 * @param listener the listener invoked for all the callbacks, this must
 * not be null.
 */
public GestureDetectorCompat(Context context, OnGestureListener listener) {
    this(context, listener, null);
}
 
Example #30
Source File: GestureDetectorCompat.java    From adt-leanback-support with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a GestureDetectorCompat with the supplied listener.
 * As usual, you may only use this constructor from a UI thread.
 * @see android.os.Handler#Handler()
 *
 * @param context the application's context
 * @param listener the listener invoked for all the callbacks, this must
 * not be null.
 */
public GestureDetectorCompat(Context context, OnGestureListener listener) {
    this(context, listener, null);
}