File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
framework/src/org/apache/cordova Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,12 @@ private void updateRootView(int bgColor) {
194
194
if (root != null ) root .setBackgroundColor (bgColor );
195
195
196
196
// Automatically set the font and icon color of the system bars based on background color.
197
- boolean isBackgroundColorLight = isColorLight (bgColor );
197
+ boolean isBackgroundColorLight ;
198
+ if (bgColor == Color .TRANSPARENT ) {
199
+ isBackgroundColorLight = isColorLight (getUiModeColor ());
200
+ } else {
201
+ isBackgroundColorLight = isColorLight (bgColor );
202
+ }
198
203
if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .R ) {
199
204
WindowInsetsController controller = window .getInsetsController ();
200
205
if (controller != null ) {
@@ -232,7 +237,12 @@ private void updateStatusBar(int bgColor) {
232
237
}
233
238
234
239
// Automatically set the font and icon color of the system bars based on background color.
235
- boolean isStatusBarBackgroundColorLight = isColorLight (bgColor );
240
+ boolean isStatusBarBackgroundColorLight ;
241
+ if (bgColor == Color .TRANSPARENT ) {
242
+ isStatusBarBackgroundColorLight = isColorLight (getUiModeColor ());
243
+ } else {
244
+ isStatusBarBackgroundColorLight = isColorLight (bgColor );
245
+ }
236
246
WindowInsetsControllerCompat controllerCompat = WindowCompat .getInsetsController (window , window .getDecorView ());
237
247
controllerCompat .setAppearanceLightStatusBars (isStatusBarBackgroundColorLight );
238
248
}
You can’t perform that action at this time.
0 commit comments