From 19fd1536a4a4faee276da09be9979dce48e1551b Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Mon, 16 Jun 2025 08:56:27 -0700 Subject: [PATCH] Clarify JS documentation for StatusBar on Android 15+ (#52044) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52044 This clarifies that some props on `StatusBar` are not working on Android 15+ See https://github.com/facebook/react-native/issues/51928 Changelog: [Internal] [Changed] - Reviewed By: yungsters Differential Revision: D76734324 fbshipit-source-id: 88b6f30f63ca0e269d5115e69a8a2b0ca222c2f4 --- .../Libraries/Components/StatusBar/StatusBar.d.ts | 4 ++++ .../react-native/Libraries/Components/StatusBar/StatusBar.js | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/packages/react-native/Libraries/Components/StatusBar/StatusBar.d.ts b/packages/react-native/Libraries/Components/StatusBar/StatusBar.d.ts index 3dd9ab2fe2f..53144c375ed 100644 --- a/packages/react-native/Libraries/Components/StatusBar/StatusBar.d.ts +++ b/packages/react-native/Libraries/Components/StatusBar/StatusBar.d.ts @@ -35,6 +35,8 @@ export interface StatusBarPropsAndroid { /** * The background color of the status bar. * + * Please note that this prop has no effect on Android 15+ + * * @platform android */ backgroundColor?: ColorValue | undefined; @@ -44,6 +46,8 @@ export interface StatusBarPropsAndroid { * the app will draw under the status bar. This is useful when using a * semi transparent status bar color. * + * Please note that this prop has no effect on Android 15+ + * * @platform android */ translucent?: boolean | undefined; diff --git a/packages/react-native/Libraries/Components/StatusBar/StatusBar.js b/packages/react-native/Libraries/Components/StatusBar/StatusBar.js index 1bcf2c188fe..5c266b11405 100644 --- a/packages/react-native/Libraries/Components/StatusBar/StatusBar.js +++ b/packages/react-native/Libraries/Components/StatusBar/StatusBar.js @@ -58,6 +58,9 @@ export type StatusBarAnimation = $Keys<{ export type StatusBarPropsAndroid = $ReadOnly<{ /** * The background color of the status bar. + * + * Please note that this prop has no effect on Android 15+ + * * @platform android */ backgroundColor?: ?ColorValue, @@ -66,6 +69,8 @@ export type StatusBarPropsAndroid = $ReadOnly<{ * When translucent is set to true, the app will draw under the status bar. * This is useful when using a semi transparent status bar color. * + * Please note that this prop has no effect on Android 15+ + * * @platform android */ translucent?: ?boolean,