Skip to content

Commit 583a6b9

Browse files
committed
hasImage code style
1 parent 4fedb14 commit 583a6b9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

library/src/com/davemorrissey/labs/subscaleview/SubsamplingScaleImageView.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2628,6 +2628,14 @@ public final void setDebug(boolean debug) {
26282628
this.debug = debug;
26292629
}
26302630

2631+
/**
2632+
* Check if an image has been set. The image may not have been loaded and displayed yet.
2633+
* @return If an image is currently set.
2634+
*/
2635+
public boolean hasImage() {
2636+
return uri != null || bitmap != null;
2637+
}
2638+
26312639
/**
26322640
* {@inheritDoc}
26332641
*/
@@ -2996,14 +3004,6 @@ public static class DefaultOnStateChangedListener implements OnStateChangedListe
29963004
@Override public void onCenterChanged(PointF newCenter, int origin) { }
29973005
@Override public void onScaleChanged(float newScale, int origin) { }
29983006

2999-
}
3000-
3001-
/**
3002-
* Check if the current instance of SubsamplingScaleImageView has an image set
3003-
* @return If an image is currently set
3004-
*/
3005-
public boolean hasImageSet(){
3006-
return uri!=null || bitmap!=null;
30073007
}
30083008

30093009
}

0 commit comments

Comments
 (0)