此栏中的矢量图标显示为黑色我需要改变颜色

问题描述

我使用的是白色但显示为黑色的矢量图标。有没有办法在 xml 中或以编程方式更改图标颜色。 Kotlin,使用 Android Studio

<com.google.android.material.bottomappbar.BottomAppBar
        android:id="@+id/bottomAppBar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:backgroundTint="#136127"
        app:fabCradleMargin="4dp"
        app:fabCradleRoundedCornerRadius="20dp">

        <com.google.android.material.bottomnavigation.BottomNavigationView
            android:id="@+id/bottomNavigationView"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginEnd="16dp"
            android:background="@android:color/transparent"
            app:menu="@menu/bottom_nav_menu" />

    </com.google.android.material.bottomappbar.BottomAppBar>

    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/_fab_board_size"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/ic_four_squares_white"
        android:backgroundTint= "@color/brown_rust"
        app:tint="@color/white"
        app:layout_anchor="@id/bottomAppBar" />

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)