當前位置: 首頁>>代碼示例>>Java>>正文


Java OnDoubleTapListener類代碼示例

本文整理匯總了Java中android.view.GestureDetector.OnDoubleTapListener的典型用法代碼示例。如果您正苦於以下問題:Java OnDoubleTapListener類的具體用法?Java OnDoubleTapListener怎麽用?Java OnDoubleTapListener使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


OnDoubleTapListener類屬於android.view.GestureDetector包,在下文中一共展示了OnDoubleTapListener類的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: lq

import android.view.GestureDetector.OnDoubleTapListener; //導入依賴的package包/類
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);
}
 
開發者ID:ChiangC,項目名稱:FMTech,代碼行數:27,代碼來源:lq.java

示例2: GestureDetectorCompatImplBase

import android.view.GestureDetector.OnDoubleTapListener; //導入依賴的package包/類
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);
}
 
開發者ID:ChiangC,項目名稱:FMTech,代碼行數:22,代碼來源:GestureDetectorCompat.java

示例3: onDoubleTap

import android.view.GestureDetector.OnDoubleTapListener; //導入依賴的package包/類
/**
 * 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;
}
 
開發者ID:markzhai,項目名稱:GitHubExplorer,代碼行數:23,代碼來源:Gestures.java

示例4: GestureDetectorCompatImplBase

import android.view.GestureDetector.OnDoubleTapListener; //導入依賴的package包/類
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);
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:13,代碼來源:GestureDetectorCompat.java

示例5: setOnDoubleTapListener

import android.view.GestureDetector.OnDoubleTapListener; //導入依賴的package包/類
public void setOnDoubleTapListener(OnDoubleTapListener newOnDoubleTapListener) {
    if (newOnDoubleTapListener != null) {
        this.mGestureDetector.setOnDoubleTapListener(newOnDoubleTapListener);
    } else {
        this.mGestureDetector.setOnDoubleTapListener(new DefaultOnDoubleTapListener(this));
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:8,代碼來源:PhotoViewAttacher.java

示例6: GestureDetectorCompatImplBase

import android.view.GestureDetector.OnDoubleTapListener; //導入依賴的package包/類
/**
 * 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);
}
 
開發者ID:GigigoGreenLabs,項目名稱:permissionsModule,代碼行數:26,代碼來源:GestureDetectorCompat.java

示例7: GestureDetectorCompatImplBase

import android.view.GestureDetector.OnDoubleTapListener; //導入依賴的package包/類
/**
 * 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);
}
 
開發者ID:klinker24,項目名稱:Android-3DTouch-PeekView,代碼行數:26,代碼來源:GestureDetectorCompat.java

示例8: GestureDetectorCompatImplBase

import android.view.GestureDetector.OnDoubleTapListener; //導入依賴的package包/類
/**
 * 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);
}
 
開發者ID:ccrama,項目名稱:Slide,代碼行數:26,代碼來源:GestureDetectorCompat.java

示例9: setOnDoubleTapListener

import android.view.GestureDetector.OnDoubleTapListener; //導入依賴的package包/類
public void setOnDoubleTapListener(OnDoubleTapListener onDoubleTapListener) {
    this.mDoubleTapListener = onDoubleTapListener;
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:4,代碼來源:GestureDetectorCompat.java

示例10: setOnDoubleTapListener

import android.view.GestureDetector.OnDoubleTapListener; //導入依賴的package包/類
public void setOnDoubleTapListener(OnDoubleTapListener l) {
    this.doubleTapListener = l;
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:4,代碼來源:TouchImageView.java

示例11: setOnDoubleTapListener

import android.view.GestureDetector.OnDoubleTapListener; //導入依賴的package包/類
public void setOnDoubleTapListener(OnDoubleTapListener newOnDoubleTapListener) {
    this.mAttacher.setOnDoubleTapListener(newOnDoubleTapListener);
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:4,代碼來源:PhotoView.java

示例12: setOnDoubleTapListener

import android.view.GestureDetector.OnDoubleTapListener; //導入依賴的package包/類
@Override
public void setOnDoubleTapListener(OnDoubleTapListener listener) {
    mDetector.setOnDoubleTapListener(listener);
}
 
開發者ID:GigigoGreenLabs,項目名稱:permissionsModule,代碼行數:5,代碼來源:GestureDetectorCompat.java

示例13: a

import android.view.GestureDetector.OnDoubleTapListener; //導入依賴的package包/類
public final void a(GestureDetector.OnDoubleTapListener paramOnDoubleTapListener)
{
  this.c = paramOnDoubleTapListener;
}
 
開發者ID:ChiangC,項目名稱:FMTech,代碼行數:5,代碼來源:lq.java

示例14: a

import android.view.GestureDetector.OnDoubleTapListener; //導入依賴的package包/類
public final void a(GestureDetector.OnDoubleTapListener paramOnDoubleTapListener)
{
  this.a.setOnDoubleTapListener(paramOnDoubleTapListener);
}
 
開發者ID:ChiangC,項目名稱:FMTech,代碼行數:5,代碼來源:ls.java


注:本文中的android.view.GestureDetector.OnDoubleTapListener類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。