浮动动作按钮中的边框

问题描述:

我正在为社交动作创建一个浮动动作按钮的应用程序。浮动动作按钮中的边框

和我在FAB上有边界。见:

enter image description here

如何删除这条边界?

+0

稍微偏离主题,但你应该只在屏幕上有一个FAB。 https://material.io/guidelines/components/buttons-floating-action-button.html – zsmb13

你应该只是有黑f作为一个单独的绘制,并设置为FAB的来源。否则,如果你想使用一个已经有一个圆形背景的绘制,都不要使用FAB,只是把它放在一个ImageButton,具有透明背景:

android:background="#0000" 
app:srcCompat="@mipmap/action_fb" 

将此属性设置为您的FloatingActionButton

app:borderWidth="0dp" 

将此添加到父项。

xmlns:app="http://schemas.android.com/apk/res-auto" 
+0

“app”中的错误 - 命名空间'app'没有绑定 – DaviDEV

+0

add this'xmlns:app =“http:// schemas .android.com/APK/RES-AUTO“'。 – Ironman

+0

http://prntscr.com/elgoa9 - 不删除 – DaviDEV