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

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

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

origin: davemorrissey/subsampling-scale-image-view

/**
 * This is a screen density aware alternative to {@link #setMinScale(float)}; it allows you to express the minimum
 * allowed scale in terms of the maximum pixel density.
 * @param dpi Source image pixel density at minimum zoom.
 */
public final void setMaximumDpi(int dpi) {
  DisplayMetrics metrics = getResources().getDisplayMetrics();
  float averageDpi = (metrics.xdpi + metrics.ydpi)/2;
  setMinScale(averageDpi / dpi);
}
origin: Piasy/BigImageViewer

if (maxScale > 1) {
  mImageView.setMinScale(1);
  mImageView.setMinScale(minScale);
origin: mozilla-tw/Rocket

/**
 * This is a screen density aware alternative to {@link #setMinScale(float)}; it allows you to express the minimum
 * allowed scale in terms of the maximum pixel density.
 * @param dpi Source image pixel density at minimum zoom.
 */
public final void setMaximumDpi(int dpi) {
  DisplayMetrics metrics = getResources().getDisplayMetrics();
  float averageDpi = (metrics.xdpi + metrics.ydpi)/2;
  setMinScale(averageDpi / dpi);
}
com.davemorrissey.labs.subscaleviewSubsamplingScaleImageViewsetMinScale

Javadoc

Set the minimum scale allowed. A value of 1 means 1:1 pixels at minimum scale. You may wish to set this according to screen density. Consider using #setMaximumDpi(int), which is density aware.

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

  • Creating JSON documents from java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • getResourceAsStream (ClassLoader)
  • startActivity (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top Sublime Text 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