diff options
Diffstat (limited to 'ahbottomnavigation/src/main/java/com/aurelhubert/ahbottomnavigation/AHBottomNavigation.java')
-rw-r--r-- | ahbottomnavigation/src/main/java/com/aurelhubert/ahbottomnavigation/AHBottomNavigation.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ahbottomnavigation/src/main/java/com/aurelhubert/ahbottomnavigation/AHBottomNavigation.java b/ahbottomnavigation/src/main/java/com/aurelhubert/ahbottomnavigation/AHBottomNavigation.java index 238ab0f..a3dd16f 100644 --- a/ahbottomnavigation/src/main/java/com/aurelhubert/ahbottomnavigation/AHBottomNavigation.java +++ b/ahbottomnavigation/src/main/java/com/aurelhubert/ahbottomnavigation/AHBottomNavigation.java @@ -961,7 +961,11 @@ public class AHBottomNavigation extends FrameLayout { this.behaviorTranslationEnabled = behaviorTranslationEnabled; if (getParent() instanceof CoordinatorLayout) { ViewGroup.LayoutParams params = getLayoutParams(); - bottomNavigationBehavior = new AHBottomNavigationBehavior<>(behaviorTranslationEnabled); + if (bottomNavigationBehavior == null) { + bottomNavigationBehavior = new AHBottomNavigationBehavior<>(behaviorTranslationEnabled); + } else { + bottomNavigationBehavior.setBehaviorTranslationEnabled(behaviorTranslationEnabled); + } ((CoordinatorLayout.LayoutParams) params).setBehavior(bottomNavigationBehavior); if (needHideBottomNavigation) { needHideBottomNavigation = false; |