diff --git a/library/src/com/davemorrissey/labs/subscaleview/SubsamplingScaleImageView.java b/library/src/com/davemorrissey/labs/subscaleview/SubsamplingScaleImageView.java index 0047c81e..f9e11f54 100644 --- a/library/src/com/davemorrissey/labs/subscaleview/SubsamplingScaleImageView.java +++ b/library/src/com/davemorrissey/labs/subscaleview/SubsamplingScaleImageView.java @@ -2628,6 +2628,14 @@ public final void setDebug(boolean debug) { this.debug = debug; } + /** + * Check if an image has been set. The image may not have been loaded and displayed yet. + * @return If an image is currently set. + */ + public boolean hasImage() { + return uri != null || bitmap != null; + } + /** * {@inheritDoc} */ @@ -2996,14 +3004,6 @@ public static class DefaultOnStateChangedListener implements OnStateChangedListe @Override public void onCenterChanged(PointF newCenter, int origin) { } @Override public void onScaleChanged(float newScale, int origin) { } - } - - /** - * Check if the current instance of SubsamplingScaleImageView has an image set - * @return If an image is currently set - */ - public boolean hasImageSet(){ - return uri!=null || bitmap!=null; } }