Tabnine Logo
GestureDetector
Code IndexAdd Tabnine to your IDE (free)

How to use
GestureDetector
in
com.oginotihiro.cropview.gestures

Best Java code snippets using com.oginotihiro.cropview.gestures.GestureDetector (Showing top 6 results out of 315)

origin: oginotihiro/cropview

@Override
public void onDrag(float dx, float dy) {
  if (mDragScaleDetector.isScaling()) {
    return;
  }
  mSuppMatrix.postTranslate(dx, dy);
  checkAndDisplayMatrix();
}
origin: wangyisll/TessTwoDemo

  public static GestureDetector newInstance(Context context, OnGestureListener listener) {
    final int sdkVersion = Build.VERSION.SDK_INT;
    GestureDetector detector;

    if (sdkVersion < Build.VERSION_CODES.ECLAIR) {
      detector = new CupcakeGestureDetector(context);
    } else if (sdkVersion < Build.VERSION_CODES.FROYO) {
      detector = new EclairGestureDetector(context);
    } else {
      detector = new FroyoGestureDetector(context);
    }

    detector.setOnGestureListener(listener);

    return detector;
  }
}
origin: wangyisll/TessTwoDemo

@Override
public boolean onTouchEvent(MotionEvent ev) {
  boolean handled = false;
  if (getDrawable() != null && mCropRect != null) {
    switch (ev.getAction()) {
      case ACTION_DOWN:
        cancelFling();
        break;
      case ACTION_CANCEL:
      case ACTION_UP:
        break;
    }
    if (null != mDragScaleDetector) {
      handled = mDragScaleDetector.onTouchEvent(ev);
    }
    if (null != mGestureDetector && mGestureDetector.onTouchEvent(ev)) {
      handled = true;
    }
  }
  return true;
}
origin: oginotihiro/cropview

  public static GestureDetector newInstance(Context context, OnGestureListener listener) {
    final int sdkVersion = Build.VERSION.SDK_INT;
    GestureDetector detector;

    if (sdkVersion < Build.VERSION_CODES.ECLAIR) {
      detector = new CupcakeGestureDetector(context);
    } else if (sdkVersion < Build.VERSION_CODES.FROYO) {
      detector = new EclairGestureDetector(context);
    } else {
      detector = new FroyoGestureDetector(context);
    }

    detector.setOnGestureListener(listener);

    return detector;
  }
}
origin: oginotihiro/cropview

@Override
public boolean onTouchEvent(MotionEvent ev) {
  boolean handled = false;
  if (getDrawable() != null && mCropRect != null) {
    switch (ev.getAction()) {
      case ACTION_DOWN:
        cancelFling();
        break;
      case ACTION_CANCEL:
      case ACTION_UP:
        break;
    }
    if (null != mDragScaleDetector) {
      handled = mDragScaleDetector.onTouchEvent(ev);
    }
    if (null != mGestureDetector && mGestureDetector.onTouchEvent(ev)) {
      handled = true;
    }
  }
  return handled;
}
origin: wangyisll/TessTwoDemo

@Override
public void onDrag(float dx, float dy) {
  if (mDragScaleDetector.isScaling()) {
    return;
  }
  mSuppMatrix.postTranslate(dx, dy);
  checkAndDisplayMatrix();
}
com.oginotihiro.cropview.gesturesGestureDetector

Most used methods

  • isScaling
  • onTouchEvent
  • setOnGestureListener

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • compareTo (BigDecimal)
  • getSystemService (Context)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now