0

我正在使用一个白色的矢量图标,但它显示为黑色。有没有办法在 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" />
4

0 回答 0