Skip to content
This repository has been archived by the owner on Jul 10, 2020. It is now read-only.

Commit

Permalink
More friendly setAnimationDuration method
Browse files Browse the repository at this point in the history
  • Loading branch information
jahirfiquitiva committed Feb 7, 2018
1 parent 142758b commit 89df235
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions library/src/main/java/jahirfiquitiva/libs/fabsmenu/FABsMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -1006,9 +1006,15 @@ public int getAnimationDuration() {
}

public void setAnimationDuration(int animationDuration) {
final ViewParent parent = getParent();
if (parent != null && parent instanceof FABsMenuLayout) {
((FABsMenuLayout) parent).setAnimationDuration(animationDuration);
setAnimationDuration(animationDuration, true);
}

public void setAnimationDuration(int animationDuration, boolean applyToOverlay) {
if (applyToOverlay) {
final ViewParent parent = getParent();
if (parent != null && parent instanceof FABsMenuLayout) {
((FABsMenuLayout) parent).setAnimationDuration(animationDuration);
}
}
this.animationDuration = animationDuration;
}
Expand Down

0 comments on commit 89df235

Please sign in to comment.