Skip to content

Commit adddd55

Browse files
committed
Address the still unfixed issues related to setStatusBarColor and setNavigationBarColor warning targeting API level 35 and above.
1 parent 42e0322 commit adddd55

File tree

5 files changed

+864
-9
lines changed

5 files changed

+864
-9
lines changed

catalog/java/io/material/catalog/sidesheet/SideSheetMainDemoFragment.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,10 @@ private void setUpModalSheet(
324324
context, androidx.appcompat.R.attr.isLightTheme, true);
325325
Window window = sheetDialog.getWindow();
326326
sheetDialog.setFitsSystemWindows(!edgeToEdgeEnabled);
327-
window.setNavigationBarColor(Color.TRANSPARENT);
327+
if (VERSION.SDK_INT < Build.VERSION_CODES.VANILLA_ICE_CREAM) {
328+
// In API 35 the call to setNavigationBarColor is deprecated, doesn't affect gesture navigation and nav bar is set to match window background.
329+
window.setNavigationBarColor(Color.TRANSPARENT);
330+
}
328331
WindowCompat.getInsetsController(window, window.getDecorView())
329332
.setAppearanceLightStatusBars(edgeToEdgeEnabled && isLightTheme);
330333

0 commit comments

Comments
 (0)