Gluon Mobile FloatingActionButton (FAB) 动画
Gluon Mobile FloatingActionButton (FAB) animation
我设法在视图的左侧获得了第二个 FAB。
commentFab.setFloatingActionButtonHandler(FloatingActionButton.BOTTOM_LEFT);
但它是用动画来实现的。如何删除动画?
FAB 用于主要操作。 Material 设计 guidelines 仅推荐一个 FAB:
Only one floating action button is recommended per screen to represent the most common action.
并带有动画:
It animates onto the screen as an expanding piece of material, by default.
Gluon 的 FloatingActionButton
被设计为在添加到视图后布局时带有平移动画。
为避免这种过渡,您可以调整 fab 的可见性:将其设置为 false,创建暂停过渡,将 fab 添加到图层,并在暂停过渡结束时将 fab 的可见性设置为 true。
在我看来,您应该使用不同的 Layer
实现。
我设法在视图的左侧获得了第二个 FAB。
commentFab.setFloatingActionButtonHandler(FloatingActionButton.BOTTOM_LEFT);
但它是用动画来实现的。如何删除动画?
FAB 用于主要操作。 Material 设计 guidelines 仅推荐一个 FAB:
Only one floating action button is recommended per screen to represent the most common action.
并带有动画:
It animates onto the screen as an expanding piece of material, by default.
Gluon 的 FloatingActionButton
被设计为在添加到视图后布局时带有平移动画。
为避免这种过渡,您可以调整 fab 的可见性:将其设置为 false,创建暂停过渡,将 fab 添加到图层,并在暂停过渡结束时将 fab 的可见性设置为 true。
在我看来,您应该使用不同的 Layer
实现。