【发布时间】:2016-02-19 04:23:45
【问题描述】:
我开发了 Android 应用程序,我想在我的布局中使用扩展的浮动按钮,例如路径应用程序上的浮动按钮。我希望有人能给我举例说明如何制作这些东西的代码。谢谢。
【问题讨论】:
标签: android android-layout floating-action-button
我开发了 Android 应用程序,我想在我的布局中使用扩展的浮动按钮,例如路径应用程序上的浮动按钮。我希望有人能给我举例说明如何制作这些东西的代码。谢谢。
【问题讨论】:
标签: android android-layout floating-action-button
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hellooooo"
app:icon = "@drawable/pass_resource_here"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
</com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton>
【讨论】:
这里有一个详细的教程,教你如何用动画创建一个好的扩展浮动按钮https://www.learn2crack.com/2015/10/android-floating-action-button-animations.html
【讨论】:
尝试使用此库,并使用库中的示例项目将其修改为您喜欢的方式
【讨论】: