diff --git a/catalog/java/io/material/catalog/navigationdrawer/CustomNavigationDrawerDemoActivity.java b/catalog/java/io/material/catalog/navigationdrawer/CustomNavigationDrawerDemoActivity.java index 5f3726d0015..15e972334bb 100644 --- a/catalog/java/io/material/catalog/navigationdrawer/CustomNavigationDrawerDemoActivity.java +++ b/catalog/java/io/material/catalog/navigationdrawer/CustomNavigationDrawerDemoActivity.java @@ -36,6 +36,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.RequiresApi; +import androidx.core.content.ContextCompat; import androidx.drawerlayout.widget.DrawerLayout; import androidx.drawerlayout.widget.DrawerLayout.LayoutParams; import androidx.drawerlayout.widget.DrawerLayout.SimpleDrawerListener; @@ -94,6 +95,7 @@ public void onDrawerClosed(@NonNull View drawerView) { unregisterBackCallback(); } }); + drawerLayout.setScrimColor(ContextCompat.getColor(this, R.color.mtrl_scrim_color)); View endDrawer = view.findViewById(R.id.custom_drawer_end); view.findViewById(R.id.show_end_drawer_gravity) diff --git a/catalog/java/io/material/catalog/navigationdrawer/NavigationDrawerDemoActivity.java b/catalog/java/io/material/catalog/navigationdrawer/NavigationDrawerDemoActivity.java index e1cb1e0626a..a610085ef7b 100644 --- a/catalog/java/io/material/catalog/navigationdrawer/NavigationDrawerDemoActivity.java +++ b/catalog/java/io/material/catalog/navigationdrawer/NavigationDrawerDemoActivity.java @@ -27,6 +27,7 @@ import androidx.activity.OnBackPressedCallback; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; import androidx.core.view.GravityCompat; import androidx.drawerlayout.widget.DrawerLayout; import androidx.drawerlayout.widget.DrawerLayout.SimpleDrawerListener; @@ -82,6 +83,7 @@ public void onDrawerClosed(@NonNull View drawerView) { drawerOnBackPressedCallback.setEnabled(false); } }); + drawerLayout.setScrimColor(ContextCompat.getColor(this, R.color.mtrl_scrim_color)); NavigationView navigationViewStart = view.findViewById(R.id.navigation_view_start); initNavigationView(navigationViewStart);