As I'm very new to Android UIs, I'm currently spending a little too much time trying to put a different color on an item (button) of a toolbar.
I want the "Clear" button to get white. Here is the code for the toolbar menu
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<item
android:id="@+id/actionClear"
android:orderInCategory="100"
android:title="@string/clear"
app:showAsAction="always" />
<item
android:id="@+id/actionCheck"
android:icon="@drawable/ic_check"
android:orderInCategory="300"
android:title="@string/done"
app:showAsAction="ifRoom" />
</menu>
In my styles.xml, I have the following:
<style name="Theme" parent="Theme.MaterialComponents.Light.NoActionBar">
<item name="toolbarStyle">@style/Theme.Toolbar</item>
</style>
<style name="Theme.Toolbar" parent="Widget.MaterialComponents.Toolbar">
<item name="android:background">@color/kaki_light</item>
<item name="titleTextColor">@color/white</item>
<item name="titleTextAppearance">@style/Theme.Toolbar.TitleAppearance</item>
</style>
I've tried lots of things but I'm unsure how to identify the menu item.
Thanks a lot!