Skip to content

Commit

Permalink
处理 Modal 未正确处理状态栏样式的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
listenzz committed Dec 12, 2024
1 parent 6d97008 commit fe16f3a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2.17.5

### Android specific

- 处理 Modal 未能正确设置状态栏样式的问题

## 2.17.4

### Android specific
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
super.onViewCreated(view, savedInstanceState);
garden.setupToolbar();
}

@NonNull
@Override
protected BarStyle preferredStatusBarStyle() {
Expand All @@ -107,12 +107,25 @@ protected BarStyle preferredStatusBarStyle() {
}

if (getPresentationStyle() == PresentationStyle.OverFullScreen) {
return BarStyle.LightContent;
return SystemUI.activityStatusBarStyle(requireActivity());
}

return super.preferredStatusBarStyle();
}

@Override
protected boolean preferredStatusBarHidden() {
if (forceTransparentDialogWindow()) {
return SystemUI.isStatusBarHidden(requireActivity().getWindow());
}

if (getPresentationStyle() == PresentationStyle.OverFullScreen) {
return SystemUI.isStatusBarHidden(requireActivity().getWindow());
}

return super.preferredStatusBarHidden();
}

@Override
protected boolean preferredNavigationBarHidden() {
if (getPresentationStyle() == PresentationStyle.OverFullScreen) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hybrid-navigation",
"description": "React Native Navigation that supports seamless navigation between Native and React.",
"version": "2.17.4",
"version": "2.17.5",
"main": "./lib/index.js",
"typings": "./lib/index.d.ts",
"react-native": "src/index",
Expand Down

0 comments on commit fe16f3a

Please sign in to comment.