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

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

manabu-nakamura
Copy link
Contributor

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

@@ -94,6 +94,7 @@ public void onDrawerClosed(@NonNull View drawerView) {
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