下面列出了android.view.GestureDetector.OnDoubleTapListener#android.view.GestureDetector.OnGestureListener 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
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);
}
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);
}
}
/**
* 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);
}
/**
* 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);
}
/**
* 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);
}
/**
* 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);
}
/**
* 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);
}
/**
* 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);
}
/**
* 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);
}
protected OnGestureListener getGestureListener() {
return new GestureListener();
}
public GestureDetectorCompatImplJellybeanMr2(Context context, OnGestureListener listener, Handler handler) {
this.mDetector = new GestureDetector(context, listener, handler);
}
public GestureDetectorCompat(Context context, OnGestureListener listener) {
this(context, listener, null);
}
public GestureDetectorCompatImplJellybeanMr2(Context context, OnGestureListener listener,
Handler handler) {
mDetector = new GestureDetector(context, listener, handler);
}
public GestureDetectorCompatImplJellybeanMr2(Context context, OnGestureListener listener,
Handler handler) {
mDetector = new GestureDetector(context, listener, handler);
}
public GestureDetectorCompatImplJellybeanMr2(Context context, OnGestureListener listener,
Handler handler) {
mDetector = new GestureDetector(context, listener, handler);
}
public GestureDetectorCompatImplJellybeanMr2(Context context, OnGestureListener listener,
Handler handler) {
mDetector = new GestureDetector(context, listener, handler);
}
protected OnGestureListener getGestureListener() {
return new GestureListener();
}
public GestureDetectorCompatImplJellybeanMr2(Context context, OnGestureListener listener,
Handler handler) {
mDetector = new GestureDetector(context, listener, handler);
}
public GestureDetectorCompatImplJellybeanMr2(Context context, OnGestureListener listener,
Handler handler) {
mDetector = new GestureDetector(context, listener, handler);
}
public GestureDetectorCompatImplJellybeanMr2(Context context, OnGestureListener listener,
Handler handler) {
mDetector = new GestureDetector(context, listener, handler);
}
/**
* 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);
}
}
/**
* 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);
}
}
/**
* 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);
}
}
/**
* 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);
}
}
/**
* 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);
}
}
/**
* 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);
}
}
/**
* 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);
}
}
/**
* 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);
}
/**
* 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.
*/
public GestureDetectorCompat(Context context, OnGestureListener listener) {
this(context, listener, null);
}
/**
* 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);
}