React-native-navigation: [V2]Immersive mode

Created on 30 Oct 2018  路  8Comments  路  Source: wix/react-native-navigation

Issue Description

I am trying to enter immersive mode when app starts but the screen won't redraw over the part where the navigation bar dissapeared

Steps to Reproduce / Code Snippets / Screenshots


Environment

  • React Native Navigation version: 2
  • React Native version: 0.57
  • Platform(s) (iOS, Android, or both?):Android
  • Device info (Simulator/Device? OS version? Debug/Release?): Google Pixel 2
hacktoberfest Android accepteenhancement 馃搶 pinned

Most helpful comment

@jfrolich That branch was an unsuccessful experiment, but I do plan on supporting this feature in Q2 2020

All 8 comments

How are you trying to enter immersive mode?

Are you using drawBehind: true property on the topBar when you enter immersive mode?

yes it's set to true also the orientation it is set to landscape

I'm actually experimenting with this now in windowInsets branch.

It includes a new options to modify the navigationBar

navigationBar: {
  drawBehind: true | false,
  backgroundColor: String
}

The downside of this branch is that it in order to handle drawing under the status bar and the navigation bar - I had to handle all insets myself rendering android:windowSoftInputMode="adjustResize" useless. This means the system doesn't handle insets for you when the keyboard opens for example and instead RNN handles all insets.
I'm a bit hesitant to introduce this change as I'm not entirely sure what effects it will have.

        topBar: {
          visible: false,
           height: 0,
           drawBehind: false
         },
         statusBar: {
           drawBehind: true,
           visible: true,
           style: 'dark',
           backgroundColor: 'transparent'
         }

it works!

I'm actually experimenting with this now in windowInsets branch.

It includes a new options to modify the navigationBar

navigationBar: {
  drawBehind: true | false,
  backgroundColor: String
}

The downside of this branch is that it in order to handle drawing under the status bar and the navigation bar - I had to handle all insets myself rendering android:windowSoftInputMode="adjustResize" useless. This means the system doesn't handle insets for you when the keyboard opens for example and instead RNN handles all insets.
I'm a bit hesitant to introduce this change as I'm not entirely sure what effects it will have.

Any plans to merge this into master (drawing behind the navigation bar?)

@jfrolich That branch was an unsuccessful experiment, but I do plan on supporting this feature in Q2 2020

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kiroukou picture kiroukou  路  3Comments

birkir picture birkir  路  3Comments

yedidyak picture yedidyak  路  3Comments

henrikra picture henrikra  路  3Comments

nbolender picture nbolender  路  3Comments