Java 类android.view.GestureDetector.OnDoubleTapListener 实例源码
项目:FMTech
文件:GestureDetectorCompat.java
public GestureDetectorCompatImplBase(Context paramContext, GestureDetector.OnGestureListener paramOnGestureListener, Handler paramHandler)
{
this.mListener = paramOnGestureListener;
if ((paramOnGestureListener instanceof GestureDetector.OnDoubleTapListener)) {
this.mDoubleTapListener = ((GestureDetector.OnDoubleTapListener)paramOnGestureListener);
}
if (paramContext == null) {
throw new IllegalArgumentException("Context must not be null");
}
if (this.mListener == null) {
throw new IllegalArgumentException("OnGestureListener must not be null");
}
this.mIsLongpressEnabled = true;
ViewConfiguration localViewConfiguration = ViewConfiguration.get(paramContext);
int i = localViewConfiguration.getScaledTouchSlop();
int j = localViewConfiguration.getScaledDoubleTapSlop();
this.mMinimumFlingVelocity = localViewConfiguration.getScaledMinimumFlingVelocity();
this.mMaximumFlingVelocity = localViewConfiguration.getScaledMaximumFlingVelocity();
this.mTouchSlopSquare = (i * i);
this.mDoubleTapSlopSquare = (j * j);
}
项目:FMTech
文件:lq.java
public lq(Context paramContext, GestureDetector.OnGestureListener paramOnGestureListener, Handler paramHandler)
{
if (paramHandler != null) {}
for (this.a = new lr(this, paramHandler);; this.a = new lr(this))
{
this.b = paramOnGestureListener;
if ((paramOnGestureListener instanceof GestureDetector.OnDoubleTapListener)) {
this.c = ((GestureDetector.OnDoubleTapListener)paramOnGestureListener);
}
if (paramContext != null) {
break;
}
throw new IllegalArgumentException("Context must not be null");
}
if (this.b == null) {
throw new IllegalArgumentException("OnGestureListener must not be null");
}
this.w = true;
ViewConfiguration localViewConfiguration = ViewConfiguration.get(paramContext);
int i1 = localViewConfiguration.getScaledTouchSlop();
int i2 = localViewConfiguration.getScaledDoubleTapSlop();
this.j = localViewConfiguration.getScaledMinimumFlingVelocity();
this.k = localViewConfiguration.getScaledMaximumFlingVelocity();
this.h = (i1 * i1);
this.i = (i2 * i2);
}
项目:GitHubExplorer
文件:Gestures.java
/**
* Register listener on double-tap gesture for view
*
* @param view
* @param listener
* @return view
*/
public static View onDoubleTap(final View view,
final OnDoubleTapListener listener) {
final GestureDetector detector = new GestureDetector(view.getContext(),
new SimpleOnGestureListener());
detector.setOnDoubleTapListener(listener);
view.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
return detector.onTouchEvent(event);
}
});
return view;
}
项目:github-v2
文件:Gestures.java
/**
* Register listener on double-tap gesture for view
*
* @param view
* @param listener
* @return view
*/
public static View onDoubleTap(final View view,
final OnDoubleTapListener listener) {
final GestureDetector detector = new GestureDetector(view.getContext(),
new SimpleOnGestureListener());
detector.setOnDoubleTapListener(listener);
view.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
return detector.onTouchEvent(event);
}
});
return view;
}
项目:wishlist_hackugyo
文件:Gestures.java
/**
* Register listener on double-tap gesture for view
*
* @param view
* @param listener
* @return view
*/
public static View onDoubleTap(final View view,
final OnDoubleTapListener listener) {
final GestureDetector detector = new GestureDetector(view.getContext(),
new SimpleOnGestureListener());
detector.setOnDoubleTapListener(listener);
view.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
return detector.onTouchEvent(event);
}
});
return view;
}
项目:Ghostbin-for-Android
文件:Gestures.java
/**
* Register listener on double-tap gesture for view
*
* @param view
* @param listener
* @return view
*/
public static View onDoubleTap(final View view,
final OnDoubleTapListener listener) {
final GestureDetector detector = new GestureDetector(view.getContext(),
new SimpleOnGestureListener());
detector.setOnDoubleTapListener(listener);
view.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
return detector.onTouchEvent(event);
}
});
return view;
}
项目:letv
文件:GestureDetectorCompat.java
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);
}
项目:boohee_v5.6
文件:GestureDetectorCompat.java
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);
}
项目:boohee_v5.6
文件:PhotoViewAttacher.java
public void setOnDoubleTapListener(OnDoubleTapListener newOnDoubleTapListener) {
if (newOnDoubleTapListener != null) {
this.mGestureDetector.setOnDoubleTapListener(newOnDoubleTapListener);
} else {
this.mGestureDetector.setOnDoubleTapListener(new DefaultOnDoubleTapListener(this));
}
}
项目:permissionsModule
文件:GestureDetectorCompat.java
/**
* 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);
}
项目:Android-3DTouch-PeekView
文件:GestureDetectorCompat.java
/**
* 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);
}
项目:awesomerecyclerview
文件:GestureDetectorCompat.java
/**
* 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);
}
项目:ShoppingMall
文件:GestureDetectorCompat.java
/**
* 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);
}
项目:Slide
文件:GestureDetectorCompat.java
/**
* 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);
}
项目:CodenameOne
文件:GestureDetectorCompat.java
/**
* 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);
}
项目:adt-leanback-support
文件:GestureDetectorCompat.java
/**
* 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);
}
项目:generator-android
文件:GestureDetectorCompat.java
/**
* 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);
}
项目:informant-droid
文件:GestureDetectorCompat.java
/**
* 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);
}
项目:android-recipes-app
文件:GestureDetectorCompat.java
/**
* 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);
}
项目:bitcast
文件:GestureDetectorCompat.java
/**
* 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);
}
项目:V.FlyoutTest
文件:GestureDetectorCompat.java
/**
* 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);
}
项目:guideshow
文件:GestureDetectorCompat.java
/**
* 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);
}
项目:IntranetEpitechV2
文件:GestureDetectorCompat.java
/**
* 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);
}
项目:MoSeS--Client-
文件:GestureDetectorCompat.java
/**
* 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);
}
项目:android.support.v4
文件:GestureDetectorCompat.java
/**
* 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);
}
项目:letv
文件:GestureDetectorCompat.java
public void setOnDoubleTapListener(OnDoubleTapListener onDoubleTapListener) {
this.mDoubleTapListener = onDoubleTapListener;
}
项目:letv
文件:GestureDetectorCompat.java
public void setOnDoubleTapListener(OnDoubleTapListener listener) {
this.mDetector.setOnDoubleTapListener(listener);
}
项目:letv
文件:GestureDetectorCompat.java
public void setOnDoubleTapListener(OnDoubleTapListener listener) {
this.mImpl.setOnDoubleTapListener(listener);
}
项目:boohee_v5.6
文件:TouchImageView.java
public void setOnDoubleTapListener(OnDoubleTapListener l) {
this.doubleTapListener = l;
}
项目:boohee_v5.6
文件:GestureDetectorCompat.java
public void setOnDoubleTapListener(OnDoubleTapListener onDoubleTapListener) {
this.mDoubleTapListener = onDoubleTapListener;
}
项目:boohee_v5.6
文件:GestureDetectorCompat.java
public void setOnDoubleTapListener(OnDoubleTapListener listener) {
this.mDetector.setOnDoubleTapListener(listener);
}
项目:boohee_v5.6
文件:GestureDetectorCompat.java
public void setOnDoubleTapListener(OnDoubleTapListener listener) {
this.mImpl.setOnDoubleTapListener(listener);
}
项目:boohee_v5.6
文件:PhotoView.java
public void setOnDoubleTapListener(OnDoubleTapListener newOnDoubleTapListener) {
this.mAttacher.setOnDoubleTapListener(newOnDoubleTapListener);
}
项目:permissionsModule
文件:GestureDetectorCompat.java
@Override
public void setOnDoubleTapListener(OnDoubleTapListener listener) {
mDetector.setOnDoubleTapListener(listener);
}
项目:Android-3DTouch-PeekView
文件:GestureDetectorCompat.java
@Override
public void setOnDoubleTapListener(OnDoubleTapListener listener) {
mDetector.setOnDoubleTapListener(listener);
}
项目:FMTech
文件:lq.java
public final void a(GestureDetector.OnDoubleTapListener paramOnDoubleTapListener)
{
this.c = paramOnDoubleTapListener;
}
项目:FMTech
文件:ls.java
public final void a(GestureDetector.OnDoubleTapListener paramOnDoubleTapListener)
{
this.a.setOnDoubleTapListener(paramOnDoubleTapListener);
}
项目:awesomerecyclerview
文件:GestureDetectorCompat.java
@Override
public void setOnDoubleTapListener(OnDoubleTapListener listener) {
mDetector.setOnDoubleTapListener(listener);
}
项目:ShoppingMall
文件:GestureDetectorCompat.java
@Override
public void setOnDoubleTapListener(OnDoubleTapListener listener) {
mDetector.setOnDoubleTapListener(listener);
}
项目:Slide
文件:GestureDetectorCompat.java
@Override
public void setOnDoubleTapListener(OnDoubleTapListener listener) {
mDetector.setOnDoubleTapListener(listener);
}