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

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

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

origin: davemorrissey/subsampling-scale-image-view

/**
 * A density aware alternative to {@link #setDoubleTapZoomScale(float)}; this allows you to express the scale the
 * image will zoom in to when double tapped in terms of the image pixel density. Values lower than the max scale will
 * be ignored. A sensible starting point is 160 - the default used by this view.
 * @param dpi New value for double tap gesture zoom scale.
 */
public final void setDoubleTapZoomDpi(int dpi) {
  DisplayMetrics metrics = getResources().getDisplayMetrics();
  float averageDpi = (metrics.xdpi + metrics.ydpi)/2;
  setDoubleTapZoomScale(averageDpi/dpi);
}
origin: Piasy/BigImageViewer

mImageView.setDoubleTapZoomScale(result);
origin: davemorrissey/subsampling-scale-image-view

  view.setDoubleTapZoomDpi(240);
} else {
  view.setDoubleTapZoomScale(1F);
origin: mozilla-tw/Rocket

/**
 * A density aware alternative to {@link #setDoubleTapZoomScale(float)}; this allows you to express the scale the
 * image will zoom in to when double tapped in terms of the image pixel density. Values lower than the max scale will
 * be ignored. A sensible starting point is 160 - the default used by this view.
 * @param dpi New value for double tap gesture zoom scale.
 */
public final void setDoubleTapZoomDpi(int dpi) {
  DisplayMetrics metrics = getResources().getDisplayMetrics();
  float averageDpi = (metrics.xdpi + metrics.ydpi)/2;
  setDoubleTapZoomScale(averageDpi/dpi);
}
origin: kollerlukas/Camera-Roll-Android-App

imageView.setMinimumDpi(80);
imageView.setDoubleTapZoomScale(1.0f);
com.davemorrissey.labs.subscaleviewSubsamplingScaleImageViewsetDoubleTapZoomScale

Javadoc

Set the scale the image will zoom in to when double tapped. This also the scale point where a double tap is interpreted as a zoom out gesture - if the scale is greater than 90% of this value, a double tap zooms out. Avoid using values greater than the max zoom.

Popular methods of SubsamplingScaleImageView

  • setImage
    Set the image source from a bitmap, resource, asset, file or other URI, starting with a given orient
  • 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>
  • getCenter
    Returns the source point at the center of the view.
  • <init>,
  • getCenter,
  • getContext,
  • getHeight,
  • getOrientation,
  • getScale,
  • isReady,
  • onDraw,
  • onImageLoaded

Popular in Java

  • Making http requests using okhttp
  • compareTo (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • getSupportFragmentManager (FragmentActivity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • JLabel (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Best IntelliJ plugins
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