diff --git a/library/src/main/java/jahirfiquitiva/libs/fabsmenu/FABsMenu.java b/library/src/main/java/jahirfiquitiva/libs/fabsmenu/FABsMenu.java index fe2da10..d53ca75 100644 --- a/library/src/main/java/jahirfiquitiva/libs/fabsmenu/FABsMenu.java +++ b/library/src/main/java/jahirfiquitiva/libs/fabsmenu/FABsMenu.java @@ -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; }