Skip to content

Commit

Permalink
hasImage code style
Browse files Browse the repository at this point in the history
  • Loading branch information
davemorrissey committed Nov 5, 2016
1 parent 4fedb14 commit 583a6b9
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}
*/
Expand Down Expand Up @@ -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;
}

}

0 comments on commit 583a6b9

Please sign in to comment.