In my app I am using a material design floating action button. Whenever I change the backgroundTintColor property of the button to something with an alpha below 255, it creates this strange circle within the button. I have provided a picture of the button below with my xml code... Any help would be greatly appreciated.
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right|end"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true">
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="55dp"
android:layout_height="55dp"
android:clickable="true"
android:layout_margin="12dp"
android:src="@drawable/ic_play"
app:backgroundTint="#64a9a9a9"
android:layout_gravity="center"
/>
</FrameLayout>
这很可能是因为背景用于创建shadow
或elevation
和 src 来显示fab
的主要内容,但您正在更改它,请查看fab
https://android.googlesource.com/platform/frameworks/support 的源代码/+/master/design/src/android/support/design/widget/FloatingActionButton.java?autodive=0%2F%2F
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.