Skip to content

Commit

Permalink
fixes duplicate display issue with custom views
Browse files Browse the repository at this point in the history
  • Loading branch information
keyboardsurfer committed Apr 28, 2013
1 parent f782804 commit d7e6a8a
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,15 @@ public static String getLicenseText() {
* <code>false</code>.
*/
boolean isShowing() {
return (null != activity) && (null != croutonView) && (null != croutonView.getParent());
return (null != activity) && (isCroutonViewNotNull() || isCustomViewNotNull());
}

private boolean isCroutonViewNotNull() {
return (null != croutonView) && (null != croutonView.getParent());
}

private boolean isCustomViewNotNull() {
return (null != customView) && (null != customView.getParent());
}

/** Removes the activity reference this {@link Crouton} is holding */
Expand Down

0 comments on commit d7e6a8a

Please sign in to comment.