Skip to content

Respect theme enforceNavigationBarContrast attribute#56413

Open
zoontek wants to merge 1 commit intofacebook:mainfrom
zoontek:respect-system-bars-styles
Open

Respect theme enforceNavigationBarContrast attribute#56413
zoontek wants to merge 1 commit intofacebook:mainfrom
zoontek:respect-system-bars-styles

Conversation

@zoontek
Copy link
Copy Markdown
Contributor

@zoontek zoontek commented Apr 10, 2026

Summary:

This PR adds respect of the theme's enforceNavigationBarContrast attribute in WindowUtil enableEdgeToEdge (this will allow us to delete our EdgeToEdgePackage.kt file, and prevent a glitch where the navigation bar is semi-opaque for a short instant when user explicitly set android:enforceNavigationBarContrast to false).

Changelog:

[ANDROID] [CHANGED] - Respect theme enforceNavigationBarContrast attribute

Test Plan:

  • Verified edge-to-edge rendering on API 30+ (transparent status/navigation bars, correct display cutout behavior).
  • Verified navigation bar contrast enforcement respects the theme attribute on API 29+ (with android:enforceNavigationBarContrast to true (default) and false).
  • Verified fallback navigation bar colors on API 26-28 (light/dark scrim) and API < 26 (dark scrim).

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 10, 2026
@zoontek zoontek changed the title Respect system bars styles Use WindowCompat.enableEdgeToEdge() and respect theme enforceNavigationBarContrast attribute Apr 10, 2026
Copy link
Copy Markdown

@rachel11026725 rachel11026725 left a comment

Choose a reason for hiding this comment

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

Please fix

@facebook-github-tools facebook-github-tools bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Apr 10, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Apr 10, 2026

@alanleedev has imported this pull request. If you are a Meta employee, you can view this in D100384656.

@zoontek zoontek changed the title Use WindowCompat.enableEdgeToEdge() and respect theme enforceNavigationBarContrast attribute Respect theme enforceNavigationBarContrast attribute Apr 11, 2026
@zoontek zoontek force-pushed the respect-system-bars-styles branch from d78aed6 to 0ef7a32 Compare April 11, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants