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

[ISSUE] Theme is not changed in api 32 #62

Open
elboyev opened this issue Apr 1, 2022 · 1 comment
Open

[ISSUE] Theme is not changed in api 32 #62

elboyev opened this issue Apr 1, 2022 · 1 comment
Assignees

Comments

@elboyev
Copy link

elboyev commented Apr 1, 2022

I have two themes.xml, day and night. And I tried to add custom material dialog items to themes.xml but style did not change

<resources xmlns:tools="http://schemas.android.com/tools">
    <!-- Base application theme. -->
    <style name="Theme.DANISHBETON" parent="Theme.MaterialComponents.Light.NoActionBar">
        <!-- Primary brand color. -->
        <item name="colorPrimary">@color/purple_500</item>
        <item name="colorPrimaryVariant">@color/purple_700</item>
        <item name="colorOnPrimary">@color/white</item>
        <!-- Secondary brand color. -->
        <item name="colorSecondary">@color/teal_200</item>
        <item name="colorSecondaryVariant">@color/teal_700</item>
        <item name="colorOnSecondary">@color/black</item>
        <!-- Status bar color. -->
        <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
        <!-- Customize your theme here. -->
        <!-- MD. -->
        <item name="material_dialog_background">#FFFFFF</item>
        <item name="material_dialog_title_text_color">#000000</item>
        <item name="material_dialog_message_text_color">#5F5F5F</item>
        <item name="material_dialog_positive_button_color">@color/danisred</item>
        <item name="material_dialog_positive_button_text_color">#FFFFFF</item>
        <item name="material_dialog_negative_button_text_color">@color/danisred</item>
    </style>
<resources>
@elboyev elboyev changed the title [BUG] Theme is not changed in api 32 [ISSUE] Theme is not changed in api 32 Apr 1, 2022
@Granddaster
Copy link

Oh! I found out how to do it. You add this line to the bottom of the theme: ?attr/colorPrimaryVariant

That's because I'm using the latest Android Studio Version.

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

3 participants