Android : FloatingActionButton 和普通按钮的区别

Android : Difference FloatingActionButton and normal button

我试过演示 FloatingActionButton. I don't see real differences why I should change from normal button class to FloatingActionButton because if I want to make round button, I can try this tutorial:make circular button

作为 Android 文档的定义:

Floating action buttons are used for a special type of promoted action. They are distinguished by a circled icon floating above the UI and have special motion behaviors related to morphing, launching, and the transferring anchor point.

Floating action buttons come in two sizes: the default and the mini. The size can be controlled with the fabSize attribute.

我认为这里的所有内容我都可以在普通按钮中轻松实现,例如大小、圆圈、上面 UI。只有一件事我不明白:

special motion behaviors related to morphing, launching, and the transferring anchor point

我真的不知道这个。 morphing lauching and transfering anchor point 是什么意思?请帮我解释一下。

谢谢:)

在 Google 的 Material 设计指南中有一篇关于浮动操作按钮的好文章:https://www.google.com/design/spec/components/buttons-floating-action-button.html 有很多关于如何(以及应该和应该)的示例't) 在 activity 过渡时使用浮动操作按钮,以及如何使用它来创建漂亮、有意义和合乎逻辑的动画。

如果您将正确的浮动操作按钮(来自支持设计库的那个)与 CoordinatorLayout 一起使用,它也会处理 Snackbars。当 Snackbar 出现时,Floating Action Button 会向上移动,以免被 Snackbar 覆盖。你可以在这里查看:http://android-developers.blogspot.cz/2015/05/android-design-support-library.html