Assigned
Status Update
Comments
ma...@gmail.com <ma...@gmail.com> #2
This is a workaround.
public class MainActivity extends AppCompatActivity {
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding.drawerLayout.setScrimColor(0x52000000); // *
}
}
ma...@gmail.com <ma...@gmail.com> #3
Scrims use the scrim color role at an opacity of 32%.
Navigation drawers scrim color md.ref.palette.neutral-variant20
Navigation drawers scrim opacity 0.4
https://github.com/material-components/material-components-android/blob/master/docs/components/NavigationDrawer.md :
Element | Attribute | Related method(s) | Default value
Color | N/A | setScrimColor on DrawerLayout | Black at 60% opacity
Description
Lighten the scrim color of the drawer layout (the navigation drawer).https://github.com/androidx/androidx/blob/androidx-main/drawerlayout/drawerlayout/src/main/java/androidx/drawerlayout/widget/DrawerLayout.java#L170 :
Component used: DrawerLayout
Version used: 1.1.1
Devices/Android versions reproduced on: Emulator 35.1.20 / Android 15
Sample project to trigger the issue.https://github.com/material-components/material-components-android/tree/master/catalog
A screenrecord or screenshots showing the issue (if UI related). drawerLayout.png, sideSheet.png, bottomSheet.png, datePicker.png, timePicker.png, and dialog.png