【发布时间】:2016-09-26 17:19:24
【问题描述】:
我想使用具有半透明背景颜色的 FAB。 但我得到了一个有两种不同颜色的 FAB。有什么问题?
<android.support.design.widget.FloatingActionButton
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|left"
android:fadingEdgeLength="5dp"
app:borderWidth="0dp"
app:elevation="4dp"
app:backgroundTint="#99f03456"
app:fabSize="normal"/>
而且没有任何可绘制对象。
【问题讨论】:
-
尝试在您的
color.xml中创建此颜色并使用app:backgroundTint="@color/yourcolor" -
定义你的颜色在您的项目中设置主题样式
-
@BOUTERBIATOualid 没有区别。
-
@MohammedSameerAhmad 不工作。
-
尝试删除你的背景drawable,看看会发生什么
标签: android xml android-support-library floating-action-button