Skip to content

[Catalog] workaround for #3635 ([Navigation Drawer] Unify scrim color)#4530

Open
manabu-nakamura wants to merge 2 commits intomaterial-components:masterfrom
manabu-nakamura:navigationdrawer2
Open

[Catalog] workaround for #3635 ([Navigation Drawer] Unify scrim color)#4530
manabu-nakamura wants to merge 2 commits intomaterial-components:masterfrom
manabu-nakamura:navigationdrawer2

Conversation

@manabu-nakamura
Copy link
Contributor

@manabu-nakamura manabu-nakamura commented Jan 6, 2025

unregisterBackCallback();
}
});
drawerLayout.setScrimColor(0x52000000);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Define it as a color resource?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried using mtrl_scrim_color:

drawerLayout.setScrimColor(ContextCompat.getColor(this, R.color.mtrl_scrim_color));

https://github.com/material-components/material-components-android/blob/master/lib/java/com/google/android/material/color/res/values/colors.xml#L53-L54:

<!-- 32% opacity black -->
<color name="mtrl_scrim_color">#52000000</color>

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

Successfully merging this pull request may close these issues.

[Navigation Drawer][Side Sheet][Bottom Sheet][Date Picker][Time Picker][Dialog] Unify scrim color

2 participants