Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions packages/core/ui/core/view/index.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1329,22 +1329,24 @@ export class View extends ViewCommon {
const decorView = window.getDecorView();

// API 30+ path (preferred)
const controller = window.getInsetsController?.();
if (controller && SDK_VERSION >= 30) {
const APPEARANCE_LIGHT_STATUS_BARS = android.view.WindowInsetsController?.APPEARANCE_LIGHT_STATUS_BARS;

if (typeof value === 'string') {
this.style.statusBarStyle = value;
if (value === 'light') {
// light icons/text
controller.setSystemBarsAppearance(0, APPEARANCE_LIGHT_STATUS_BARS);
if (SDK_VERSION >= 30) {
const controller = window.getInsetsController?.();
if (controller) {
const APPEARANCE_LIGHT_STATUS_BARS = android.view.WindowInsetsController?.APPEARANCE_LIGHT_STATUS_BARS;

if (typeof value === 'string') {
this.style.statusBarStyle = value;
if (value === 'light') {
// light icons/text
controller.setSystemBarsAppearance(0, APPEARANCE_LIGHT_STATUS_BARS);
} else {
// dark icons/text
controller.setSystemBarsAppearance(APPEARANCE_LIGHT_STATUS_BARS, APPEARANCE_LIGHT_STATUS_BARS);
}
} else {
// dark icons/text
controller.setSystemBarsAppearance(APPEARANCE_LIGHT_STATUS_BARS, APPEARANCE_LIGHT_STATUS_BARS);
if (value.color != null) window.setStatusBarColor(value.color);
// No direct passthrough for systemUiVisibility on API 30+, use appearances instead
}
} else {
if (value.color != null) window.setStatusBarColor(value.color);
// No direct passthrough for systemUiVisibility on API 30+, use appearances instead
}
return;
}
Expand Down