可以在FloatingActionButton中使用图像吗?

Abh*_*mar 7 android material-design floating-action-button

我想用图像作为背景FloatingActionButton.

我知道默认的背景颜色,colorAccent我们可以很容易地改变它.但是图像作为背景呢?

如果我可以怎么样?

图片解释将永远受到赞赏.

Ogn*_*air 7

就这样使用吧

<android.support.design.widget.FloatingActionButton
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:backgroundTint="@android:color/transparent"
    android:src="@drawable/icon" />
Run Code Online (Sandbox Code Playgroud)