Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change icon tint on night mode ? #48

Open
dimaslanjaka opened this issue Mar 22, 2024 · 0 comments
Open

How to change icon tint on night mode ? #48

dimaslanjaka opened this issue Mar 22, 2024 · 0 comments

Comments

@dimaslanjaka
Copy link

dimaslanjaka commented Mar 22, 2024

I have default icon which colored by black, it useful when open app at daylight theme. But in dark theme, whole app background turn to dark grey, i want make the icon tint color to white. but not applied.

here my existing styles to override tint color on textview, might can be used as reference

values/styles.xml

<!-- Style for TextView drawables -->
    <style name="CustomTextView" parent="Widget.MaterialComponents.TextView">
        <!-- Tint color for TextView drawables -->
        <item name="android:drawableTint" tools:targetApi="m">@color/black</item>
    </style>

values-night/styles.xml

    <!-- Style for TextView drawables -->
    <style name="CustomTextView" parent="Widget.MaterialComponents.TextView">
        <!-- Tint color for TextView drawables -->
        <item name="android:drawableTint" tools:targetApi="m">@color/white</item>
    </style>

and here how I applied the style.

values/themes.xml

<!-- Custom Style for TextView drawables -->
        <item name="android:textViewStyle">@style/CustomTextView</item>

how to apply styles for expandable-fab ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant