简体   繁体   English

滚动时,NestedScrollView - Floating Action Button 向右移动

[英]When scrolling, NestedScrollView - Floating Action Button moves to the right

How do I make the Nested Scroll View - Floating Action Button move to the right when scrolling?如何使嵌套滚动视图 - 浮动操作按钮在滚动时向右移动?
I tried it:我尝试过这个:

while (NSView.getScrollY() > 1 && NSView.getHeight() > 1) {
        bottomAppBar.setFabAlignmentMode(BottomAppBar.FAB_ALIGNMENT_MODE_END);
    }

try this solution试试这个解决方案

((CoordinatorLayout.LayoutParams) fab.getLayoutParams()).gravity = Gravity.END;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM