2021-01-12 15:29 阅读 1

floatingaction and snackbar

Thank for you powerful library. I want to know how to set floatingactionbutton going up when snackbar show. Even I use CoordinatorLayout but it don't work.


  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

6条回答 默认 最新

  • weixin_39651488 weixin_39651488 2021-01-12 15:29

    Add it <com.github.clans.fab.FloatingActionButton .... fab:layout_behavior="FloatingActionMenuBehavior"/>

    And FloatingActionMenuBehavior.java

    点赞 评论 复制链接分享
  • weixin_39540704 weixin_39540704 2021-01-12 15:29

    this doesn't work .

    点赞 评论 复制链接分享
  • weixin_39651488 weixin_39651488 2021-01-12 15:29

    How do you create Snackbar?

    Example: FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); .... Snackbar.make(fab, text, duration);

    点赞 评论 复制链接分享
  • weixin_39630855 weixin_39630855 2021-01-12 15:29

    Do you need to provide the FAB for the view of the Snackbar or is CoordinatorLayout sufficient? I'm seeing this issue as well

    点赞 评论 复制链接分享
  • weixin_39928736 weixin_39928736 2021-01-12 15:29

    public boolean onDependentViewChanged is called not only when public boolean layoutDependsOn is returning 'true' but also when an anchored view changes. It may place the FAB above the whole screen. To fix it you should also check if the dependency is a Snackbar.SnackbarLayout in the onDependentViewChanged method (if you are using -andrew FloatingActionMenuBehavior.java)

    CoordinatorLayout is sufficent

    点赞 评论 复制链接分享
  • weixin_39860280 weixin_39860280 2021-01-12 15:29

    : with root layout CoordinatorLayout
    this doesn't work .

    点赞 评论 复制链接分享