【发布时间】:2017-02-11 22:22:38
【问题描述】:
我正在研究 Android 中的布局类型,我开始构建一个浮动按钮,我想知道在 Android Studio 中创建浮动按钮的最佳模式是什么。在 Android Studio 中使用 floatingActionButton 库或不使用库创建。
【问题讨论】:
-
这取决于Android提供的FloatingActionButton类是否足以满足您的需求。 FloatingActionButton 也有其他库,但大部分都已弃用,因为 Android 提供的类就足够了。
-
就我而言,我担心使用库会降低应用程序的性能。我想了解应用程序的高性能,或者做与使用本机按钮执行 floatButton 相同的事情。
-
本质上,FloatingActionButton 只是一个带有高度的图像视图。我认为您不应该担心它会破坏性能。去支持库的,他们做得很好。
标签: android android-layout android-xml android-relativelayout floating-action-button