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

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

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

origin: davemorrissey/subsampling-scale-image-view

/**
 * Sets the image orientation. It's best to call this before setting the image file or asset, because it may waste
 * loading of tiles. However, this can be freely called at any time.
 * @param orientation orientation to be set. See ORIENTATION_ static fields for valid values.
 */
public final void setOrientation(int orientation) {
  if (!VALID_ORIENTATIONS.contains(orientation)) {
    throw new IllegalArgumentException("Invalid orientation: " + orientation);
  }
  this.orientation = orientation;
  reset(false);
  invalidate();
  requestLayout();
}
origin: davemorrissey/subsampling-scale-image-view

/**
 * Called by worker task when preview image is loaded.
 */
private synchronized void onPreviewLoaded(Bitmap previewBitmap) {
  debug("onPreviewLoaded");
  if (bitmap != null || imageLoadedSent) {
    previewBitmap.recycle();
    return;
  }
  if (pRegion != null) {
    bitmap = Bitmap.createBitmap(previewBitmap, pRegion.left, pRegion.top, pRegion.width(), pRegion.height());
  } else {
    bitmap = previewBitmap;
  }
  bitmapIsPreview = true;
  if (checkReady()) {
    invalidate();
    requestLayout();
  }
}
origin: davemorrissey/subsampling-scale-image-view

/**
 * Called by worker task when full size image bitmap is ready (tiling is disabled).
 */
private synchronized void onImageLoaded(Bitmap bitmap, int sOrientation, boolean bitmapIsCached) {
  debug("onImageLoaded");
  // If actual dimensions don't match the declared size, reset everything.
  if (this.sWidth > 0 && this.sHeight > 0 && (this.sWidth != bitmap.getWidth() || this.sHeight != bitmap.getHeight())) {
    reset(false);
  }
  if (this.bitmap != null && !this.bitmapIsCached) {
    this.bitmap.recycle();
  }
  if (this.bitmap != null && this.bitmapIsCached && onImageEventListener!=null) {
    onImageEventListener.onPreviewReleased();
  }
  this.bitmapIsPreview = false;
  this.bitmapIsCached = bitmapIsCached;
  this.bitmap = bitmap;
  this.sWidth = bitmap.getWidth();
  this.sHeight = bitmap.getHeight();
  this.sOrientation = sOrientation;
  boolean ready = checkReady();
  boolean imageLoaded = checkImageLoaded();
  if (ready || imageLoaded) {
    invalidate();
    requestLayout();
  }
}
origin: davemorrissey/subsampling-scale-image-view

requestLayout();
origin: mozilla-tw/Rocket

/**
 * Sets the image orientation. It's best to call this before setting the image file or asset, because it may waste
 * loading of tiles. However, this can be freely called at any time.
 */
public final void setOrientation(int orientation) {
  if (!VALID_ORIENTATIONS.contains(orientation)) {
    throw new IllegalArgumentException("Invalid orientation: " + orientation);
  }
  this.orientation = orientation;
  reset(false);
  invalidate();
  requestLayout();
}
origin: mozilla-tw/Rocket

/**
 * Called by worker task when preview image is loaded.
 */
private synchronized void onPreviewLoaded(Bitmap previewBitmap) {
  debug("onPreviewLoaded");
  if (bitmap != null || imageLoadedSent) {
    previewBitmap.recycle();
    return;
  }
  if (pRegion != null) {
    bitmap = Bitmap.createBitmap(previewBitmap, pRegion.left, pRegion.top, pRegion.width(), pRegion.height());
  } else {
    bitmap = previewBitmap;
  }
  bitmapIsPreview = true;
  if (checkReady()) {
    invalidate();
    requestLayout();
  }
}
origin: mozilla-tw/Rocket

/**
 * Called by worker task when full size image bitmap is ready (tiling is disabled).
 */
private synchronized void onImageLoaded(Bitmap bitmap, int sOrientation, boolean bitmapIsCached) {
  debug("onImageLoaded");
  // If actual dimensions don't match the declared size, reset everything.
  if (this.sWidth > 0 && this.sHeight > 0 && (this.sWidth != bitmap.getWidth() || this.sHeight != bitmap.getHeight())) {
    reset(false);
  }
  if (this.bitmap != null && !this.bitmapIsCached) {
    this.bitmap.recycle();
  }
  if (this.bitmap != null && this.bitmapIsCached && onImageEventListener!=null) {
    onImageEventListener.onPreviewReleased();
  }
  this.bitmapIsPreview = false;
  this.bitmapIsCached = bitmapIsCached;
  this.bitmap = bitmap;
  this.sWidth = bitmap.getWidth();
  this.sHeight = bitmap.getHeight();
  this.sOrientation = sOrientation;
  boolean ready = checkReady();
  boolean imageLoaded = checkImageLoaded();
  if (ready || imageLoaded) {
    invalidate();
    requestLayout();
  }
}
origin: mozilla-tw/Rocket

requestLayout();
com.davemorrissey.labs.subscaleviewSubsamplingScaleImageViewrequestLayout

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

  • Reading from database using SQL prepared statement
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setRequestProperty (URLConnection)
  • getExternalFilesDir (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • 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