React-native-navigation: Remove gradient on Android translucent navbar

Created on 6 Feb 2018  路  3Comments  路  Source: wix/react-native-navigation

Issue Description

I tried raising this issue on Stack Overflow but got no answer so I'll try here...

I want to render behind the toolbar, to do this I am setting:

drawUnderNavBar: true,
navBarTranslucent: true, 

This works in terms of being able to draw behind the toolbar and I seem to need navBarTranslucent: true for it to work.

However, when I set navBarTranslucent on Android the toolbar seems to get a gradient from somewhere.

I want it to look like this:
Desired rendering

But instead I get:
Actual rendering

If I also add navBarTransparent: true then you can see that the gradient is still there.
Gradient rendering

How do I keep the ability to draw behind the navbar but not have the gradient/shadow colour?

Steps to Reproduce / Code Snippets / Screenshots

drawUnderNavBar: true,
navBarTranslucent: true, 

Environment

  • React Native Navigation version: 1.1.331
  • React Native version: 0.51.0
  • Platform(s) (iOS, Android, or both?): Android
  • Device info (Simulator/Device? OS version? Debug/Release?): ALL
questiostack overflow 馃彋 stale

Most helpful comment

Try this

static navigatorStyle = {
  drawUnderNavBar: true,
  navBarTransparent: true,
  navBarTranslucent: Platform.OS === 'ios',

  topBarElevationShadowEnabled: false,
  navBarNoBorder: true,
};

All 3 comments

Try this

static navigatorStyle = {
  drawUnderNavBar: true,
  navBarTransparent: true,
  navBarTranslucent: Platform.OS === 'ios',

  topBarElevationShadowEnabled: false,
  navBarNoBorder: true,
};

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 version and report back. Thank you for your contributions.

The issue has been closed for inactivity.

Was this page helpful?
0 / 5 - 0 ratings