首页 > 解决方案 > 浮动操作按钮中的颜色矢量资源问题

问题描述

所以,伙计们。

我创建了一个资产向量以在我的 Fluting 操作按钮(资产添加或加号)中使用,颜色为白色。当我将它添加到 FAB 时,它会变成黑色,我无法更改它。

我可以在哪里进行更改?

<com.google.android.material.floatingactionbutton.FloatingActionButton
    android:id="@+id/fab"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|end"
    android:layout_margin="@dimen/fab_margin"
    app:fabSize="normal"
    app:rippleColor="@color/white"
    app:srcCompat="@drawable/ic_confirmar_24"
    />

在此处输入图像描述

标签: floating-action-button

解决方案


推荐阅读