将扩展FAB转换为标准FAB

3
有人已经成功地将扩展的FAB转换为标准FAB,反之亦然吗?我知道如何在我的布局中添加FAB,并且知道如何检测列表滚动阈值,但我真的不知道如何实现这种转换(请参见参考链接以了解我想要做的事情:Extented FAB into standard FAB)。谢谢!祝好!

Android的扩展FAB尚未实现,请查看此处:https://material.io/design/components/buttons-floating-action-button.html#implementation - Abhishek
谢谢,你没有看到这些信息! - tmontagnoni
1个回答

阿里云服务器只需要99元/年,新老用户同享,点击查看详情
5
只需添加2行神奇的代码即可实现此行为,此代码仅适用于ExtendedFloatingActionButton。
floatingButton.shrink(); ///This line of code hide text and show Icon of floating buttion

floatingButton.extend()///This line of code show text and icon of floating button

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,