【发布时间】:2016-09-05 12:40:53
【问题描述】:
我正在使用 AHBottomNavigation This Tutorial
问题是当我滚动列表时底部导航栏隐藏,如何在列表视图滚动时停止隐藏底部导航栏。
滚动行为就像this 但我想修复(始终可见)底部导航栏。怎么贴这个吧。
提前致谢。
【问题讨论】:
标签: android material-design navigation-drawer navigationbar
我正在使用 AHBottomNavigation This Tutorial
问题是当我滚动列表时底部导航栏隐藏,如何在列表视图滚动时停止隐藏底部导航栏。
滚动行为就像this 但我想修复(始终可见)底部导航栏。怎么贴这个吧。
提前致谢。
【问题讨论】:
标签: android material-design navigation-drawer navigationbar
AHBottomNavigation 视图有一个方法setBehaviorTranslationEnabled(boolean behaviorTranslationEnabled)。禁用时,视图不会滚动(根据AHBottomNavigationBehavior 的方法handleDirection(V child, int scrollDirection))。
希望这会有所帮助。
【讨论】:
您需要使用setBehaviorTranslationEnabled(boolean behaviorTranslationEnabled) 并在其中传递false。该方法在您的库类中可用。
你可能已经这样做了
AHBottomNavigation aHBottomNavigation = new AHBottomNavigation();
你只需要这样做
aHBottomNavigation.setBehaviorTranslationEnabled(false);
【讨论】:
这会起作用,我也有同样的问题。
AHBottomNavigation bottomNavigation = new AHBottomNavigation();
bottomNavigation.setBehaviorTranslationEnabled(false);
【讨论】: