Package 

Class SubsamplingScaleImageView.DefaultOnImageEventListener

    • Method Summary

      Modifier and Type Method Description
      void onReady() Called when the dimensions of the image and view are known, and either a preview image,the full size image, or base layer tiles are loaded.
      void onImageLoaded() Called when the full size image is ready.
      void onPreviewLoadError(Exception e) Called when a preview image could not be loaded.
      void onImageLoadError(Exception e) Indicates an error initiliasing the decoder when using a tiling, or when loading the fullsize bitmap when tiling is disabled.
      void onTileLoadError(Exception e) Called when an image tile could not be loaded.
      void onPreviewReleased() Called when a bitmap set using ImageSource.cachedBitmap is no longer being used by the View.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • onReady

         void onReady()

        Called when the dimensions of the image and view are known, and either a preview image,the full size image, or base layer tiles are loaded. This indicates the scale and translateare known and the next draw will display an image. This event can be used to hide a loadinggraphic, or inform a subclass that it is safe to draw overlays.

      • onImageLoaded

         void onImageLoaded()

        Called when the full size image is ready. When using tiling, this means the lowest resolutionbase layer of tiles are loaded, and when tiling is disabled, the image bitmap is loaded.This event could be used as a trigger to enable gestures if you wanted interaction disabledwhile only a preview is displayed, otherwise for most cases onReady is the bestevent to listen to.

      • onPreviewLoadError

         void onPreviewLoadError(Exception e)

        Called when a preview image could not be loaded. This method cannot be relied upon; certainencoding types of supported image formats can result in corrupt or blank images being loadedand displayed with no detectable error. The view will continue to load the full size image.

        Parameters:
        e - The exception thrown.
      • onImageLoadError

         void onImageLoadError(Exception e)

        Indicates an error initiliasing the decoder when using a tiling, or when loading the fullsize bitmap when tiling is disabled. This method cannot be relied upon; certain encodingtypes of supported image formats can result in corrupt or blank images being loaded anddisplayed with no detectable error.

        Parameters:
        e - The exception thrown.
      • onTileLoadError

         void onTileLoadError(Exception e)

        Called when an image tile could not be loaded. This method cannot be relied upon; certainencoding types of supported image formats can result in corrupt or blank images being loadedand displayed with no detectable error. Most cases where an unsupported file is used willresult in an error caught by onImageLoadError.

        Parameters:
        e - The exception thrown.
      • onPreviewReleased

         void onPreviewReleased()

        Called when a bitmap set using ImageSource.cachedBitmap is no longer being used by the View.This is useful if you wish to manage the bitmap after the preview is shown