react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

[v3] setDefaultOptions topBar drawBehind not respected

Open danilobuerger opened this issue 7 years ago • 12 comments

Issue Description

When setting topBar: { drawBehind: true } as default option, it is not respected on Android. Only when setting it via static options () it is being applied.

Steps to Reproduce / Code Snippets / Screenshots

To reproduce, use v3 playground app with following diff:

diff --git a/playground/src/commons/Options.js b/playground/src/commons/Options.js
index 5a7c2ebe..01b8a26a 100644
--- a/playground/src/commons/Options.js
+++ b/playground/src/commons/Options.js
@@ -7,6 +7,9 @@ const { useSlowOpenScreenAnimations } = require('../flags');
 const SHOW_DURATION = 230 * 8;
 
 const setDefaultOptions = () => Navigation.setDefaultOptions({
+  topBar: {
+    drawBehind: true,
+  },
   layout: {
     backgroundColor: Colors.background,
     orientation: ['portrait']

Environment

  • React Native Navigation version: v3 alpha 2
  • React Native version: 0.60
  • Platform(s) (iOS, Android, or both?): Android
  • Device info (Simulator/Device? OS version? Debug/Release?): Emulator API 28

danilobuerger avatar Jul 15 '19 14:07 danilobuerger

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

stale[bot] avatar Aug 20 '19 13:08 stale[bot]

Not Stale

danilobuerger avatar Aug 20 '19 13:08 danilobuerger

I can confirm, it happens to me on 3.1.2 The statusBar also behaves the same way.

The following doesn't work (I try to achieve a full screen app) :

Navigation.setDefaultOptions({
    layout: {
      visible: false,
      drawBehind: true,
    },
    statusBar: {
      visible: false,
      drawBehind: true,
    },
  });

However when specified in the options of the component it works fine.

lucasbeef avatar Sep 03 '19 18:09 lucasbeef

@guyca I can confirm also this behavior. It's not working on 3.2.0

manuhook avatar Sep 23 '19 13:09 manuhook

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

stale[bot] avatar Oct 23 '19 13:10 stale[bot]

Not Stale

manuhook avatar Oct 23 '19 14:10 manuhook

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

stale[bot] avatar Nov 22 '19 14:11 stale[bot]

Still present on 3.7.0

manuhook avatar Nov 22 '19 15:11 manuhook

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

stale[bot] avatar Jan 19 '20 00:01 stale[bot]

Hi @guyca ! It's fixed for topBar and drawBehind, but not for statusBar and drawBehind as mentionned in this issue, would you like me to open a new issue ? Thank you 🙏

manuhook avatar Jan 28 '20 14:01 manuhook

@manuhook Yes, please open an issue and mention me. Thanks 👍

guyca avatar Jan 28 '20 15:01 guyca

@guyca @manuhook I opened the issue.

#5971

mayconmesquita avatar Feb 26 '20 23:02 mayconmesquita