Tabnine Logo
SubsamplingScaleImageView.onTouchEvent
Code IndexAdd Tabnine to your IDE (free)

How to use
onTouchEvent
method
in
com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView

Best Java code snippets using com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView.onTouchEvent (Showing top 3 results out of 315)

origin: davemorrissey/subsampling-scale-image-view

@Override
public boolean onTouchEvent(@NonNull MotionEvent event) {
  if (sPoints != null && !drawing) {
    return super.onTouchEvent(event);
  return consumed || super.onTouchEvent(event);
origin: zhihu/mirror

@Override
public boolean onTouchEvent(@NonNull MotionEvent event) {
  boolean result = super.onTouchEvent(event);
  if (isImageLoaded() && !isScaling()) {
    switch (event.getAction()) {
      case MotionEvent.ACTION_DOWN:
        if (mTransYAnim != null && mTransYAnim.isRunning()) {
          mTransYAnim.cancel();
        }
        mActionDownY = event.getY();
        mDragDistance = 0.0F;
        mIsDragDown = false;
        break;
      case MotionEvent.ACTION_MOVE:
        onActionMove(event);
        break;
      case MotionEvent.ACTION_UP:
      case MotionEvent.ACTION_CANCEL:
        onActionRelease();
        break;
      default:
        break;
    }
  }
  return result;
}
origin: kollerlukas/Camera-Roll-Android-App

return consumed || super.onTouchEvent(motionEvent);
com.davemorrissey.labs.subscaleviewSubsamplingScaleImageViewonTouchEvent

Javadoc

Handle touch events. One finger pans, and two finger pinch and zoom plus panning.

Popular methods of SubsamplingScaleImageView

  • setImage
    Set the image source from a bitmap, resource, asset, file or other URI, starting with a given orient
  • setDoubleTapZoomScale
    Set the scale the image will zoom in to when double tapped. This also the scale point where a double
  • setMaxScale
    Set the maximum scale allowed. A value of 1 means 1:1 pixels at maximum scale. You may wish to set t
  • setMinimumDpi
    This is a screen density aware alternative to #setMaxScale(float); it allows you to express the maxi
  • setScaleAndCenter
    Externally change the scale and translation of the source image. This may be used with getCenter() a
  • getWidth
  • setDoubleTapZoomDpi
    A density aware alternative to #setDoubleTapZoomScale(float); this allows you to express the scale t
  • setMinimumScaleType
    Set the minimum scale type. See static fields. Normally #SCALE_TYPE_CENTER_INSIDE is best, for image
  • setMinimumTileDpi
    By default, image tiles are at least as high resolution as the screen. For a retina screen this may
  • setPanEnabled
    Enable or disable pan gesture detection. Disabling pan causes the image to be centered.
  • setZoomEnabled
    Enable or disable zoom gesture detection. Disabling zoom locks the the current scale.
  • <init>
  • setZoomEnabled,
  • <init>,
  • getCenter,
  • getContext,
  • getHeight,
  • getOrientation,
  • getScale,
  • isReady,
  • onDraw,
  • onImageLoaded

Popular in Java

  • Start an intent from android
  • startActivity (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getContentResolver (Context)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • JButton (javax.swing)
  • JFrame (javax.swing)
  • JOptionPane (javax.swing)
  • JTextField (javax.swing)
  • 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