Open Descatres opened 1 year ago
:warning: | Newer Version of React Native is Available! |
---|---|
:information_source: | You are on a supported minor version, but it looks like there's a newer patch available - 0.71.10. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |
⚠️ Newer Version of React Native is Available! ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - 0.71.10. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.
Note: I'm using specific packages wich require specific versions of others in my project and I can't change versions that easily.
I tried with java (I made a bridge between java and react native) to test:
import android.app.Activity;
import android.view.WindowInsets;
import android.view.WindowInsetsController;
import android.view.WindowManager;
@ReactMethod
public void hideSystemBars() {
Activity currentActivity = getCurrentActivity();
if (currentActivity != null) {
currentActivity.runOnUiThread(() -> {
WindowInsetsController controller = currentActivity.getWindow().getDecorView().getWindowInsetsController();
if (controller != null) {
controller.hide(WindowInsets.Type.statusBars() | WindowInsets.Type.navigationBars());
}
currentActivity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
});
}
}
And the problem persists.
Problem persist in 0.71.10.
@cortinico Is this a known issue , A PR has also been raised with the fix,Is this in the pipeline,
Thanks in advance
@cortinico Is this a known issue , A PR has also been raised with the fix,Is this in the pipeline,
Don't you mind following up on the PRs comments that @lunaleaps left then?
This issue is currently making it impossible to use Modal
in a fullscreen app (such as a game, for instance) because it breaks the UI. I tried applying the code from https://github.com/facebook/react-native/pull/36854 but I realized that I'd have to build RN from source which I don't know how to do and seems it would really complicate our workflow with the app in question.
Looking forward to any updates here.
For anyone looking for a workaround, I've opted to stop using Modal
until this has been resolved, and I'm instead using react-native-portal to "teleport" my modals to the root of my view hierarchy so that I can show the content on top of everything else.
Facing a similar issue by adding in my MainAcitivity.java
this code into my onCreate function :
Window w = getWindow();
// these styles should be under super.onCreate to take effect
w.setStatusBarColor(Color.TRANSPARENT);
w.setNavigationBarColor(Color.TRANSPARENT);
w.setNavigationBarContrastEnforced(false);
w.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE );
I'm trying to achieve edge-to-edge experience in my app and it's working fine by using statusBarTranslucent
but there is no way to do so for the nav bar.
I guess you can provide something like the statusBarTranslucent
that you already supporting, or just fetch whatever settings or flags applied to the root window and reapply it on updateProperties
. @cortinico
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
this is still open
Description
I'm using SystemNavigationBar to hide my status and activity bars, in order to be able to use the full screen for the app I'm currently developing.
The bug I'm facing (as many others faced already) consists on those same bars appearing when a modal is shown.
This is already a known issue on the package repo, but I could not find any issue regarding this problem on the react-native repo. Ence, I'm creating one.
This issue seems to have appeared before on react-native's repo: https://github.com/facebook/react-native/commit/f8a4d281e2be5b68fbebf53f930d37d96236829c
Is there any fix?
Thanks in advance for any support and help.
React Native Version
0.71.4
Output of
npx react-native info
Steps to reproduce
SystemNavigationBar.fullScreen(true);
inside your functionSnack, code example, screenshot, or link to a repository
App.tsx
Buttons.tsx
Example:
Here, we can see that, at the bottom, after clicking on the open modal button, the bar appears, where it should not.