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

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

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

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

/**
 * Called by worker task when a tile has loaded. Redraws the view.
 */
private synchronized void onTileLoaded() {
  debug("onTileLoaded");
  checkReady();
  checkImageLoaded();
  if (isBaseLayerReady() && bitmap != null) {
    if (!bitmapIsCached) {
      bitmap.recycle();
    }
    bitmap = null;
    if (onImageEventListener != null && bitmapIsCached) {
      onImageEventListener.onPreviewReleased();
    }
    bitmapIsPreview = false;
    bitmapIsCached = false;
  }
  invalidate();
}
origin: davemorrissey/subsampling-scale-image-view

if (!checkReady()) {
  return;
origin: davemorrissey/subsampling-scale-image-view

this.sHeight = sHeight;
this.sOrientation = sOrientation;
checkReady();
if (!checkImageLoaded() && maxTileWidth > 0 && maxTileWidth != TILE_SIZE_AUTO && maxTileHeight > 0 && maxTileHeight != TILE_SIZE_AUTO && getWidth() > 0 && getHeight() > 0) {
  initialiseBaseLayer(new Point(maxTileWidth, maxTileHeight));
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

/**
 * Called by worker task when a tile has loaded. Redraws the view.
 */
private synchronized void onTileLoaded() {
  debug("onTileLoaded");
  checkReady();
  checkImageLoaded();
  if (isBaseLayerReady() && bitmap != null) {
    if (!bitmapIsCached) {
      bitmap.recycle();
    }
    bitmap = null;
    if (onImageEventListener != null && bitmapIsCached) {
      onImageEventListener.onPreviewReleased();
    }
    bitmapIsPreview = false;
    bitmapIsCached = false;
  }
  invalidate();
}
origin: mozilla-tw/Rocket

if (!checkReady()) {
  return;
origin: mozilla-tw/Rocket

this.sHeight = sHeight;
this.sOrientation = sOrientation;
checkReady();
if (!checkImageLoaded() && maxTileWidth > 0 && maxTileWidth != TILE_SIZE_AUTO && maxTileHeight > 0 && maxTileHeight != TILE_SIZE_AUTO && getWidth() > 0 && getHeight() > 0) {
  initialiseBaseLayer(new Point(maxTileWidth, maxTileHeight));
com.davemorrissey.labs.subscaleviewSubsamplingScaleImageViewcheckReady

Javadoc

Check whether view and image dimensions are known and either a preview, full size image or base layer tiles are loaded. First time, send ready event to listener. The next draw will display an image.

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
  • onCreateOptionsMenu (Activity)
  • compareTo (BigDecimal)
  • runOnUiThread (Activity)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Notification (javax.management)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top plugins for WebStorm
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