【问题标题】:Bottom Navigation hide on scroll Recycler view issue滚动回收器视图问题上的底部导航隐藏
【发布时间】:2016-09-05 12:40:53
【问题描述】:

我正在使用 AHBottomNavigation This Tutorial

问题是当我滚动列表时底部导航栏隐藏,如何在列表视图滚动时停止隐藏底部导航栏。

滚动行为就像this 但我想修复(始终可见)底部导航栏。怎么贴这个吧。

提前致谢。

【问题讨论】:

    标签: android material-design navigation-drawer navigationbar


    【解决方案1】:

    AHBottomNavigation 视图有一个方法setBehaviorTranslationEnabled(boolean behaviorTranslationEnabled)。禁用时,视图不会滚动(根据AHBottomNavigationBehavior 的方法handleDirection(V child, int scrollDirection))。

    希望这会有所帮助。

    【讨论】:

      【解决方案2】:

      您需要使用setBehaviorTranslationEnabled(boolean behaviorTranslationEnabled) 并在其中传递false。该方法在您的库类中可用。

      你可能已经这样做了

      AHBottomNavigation aHBottomNavigation = new AHBottomNavigation();
      

      你只需要这样做

      aHBottomNavigation.setBehaviorTranslationEnabled(false);
      

      【讨论】:

      • @NaeemIbrahim 很高兴!它帮助了你。 :)
      • @NaeemIbrahim 如果它真的对你有帮助,你可以接受我的回答。谢谢:)
      【解决方案3】:

      这会起作用,我也有同样的问题。

      AHBottomNavigation bottomNavigation = new AHBottomNavigation();
      bottomNavigation.setBehaviorTranslationEnabled(false);
      

      【讨论】:

      • 感谢您的宝贵时间。
      • 不提兄弟
      猜你喜欢
      • 1970-01-01
      • 2017-11-30
      • 2021-04-27
      • 1970-01-01
      • 2021-07-25
      • 2019-12-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多