question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

elevation doesn't work properly

See original GitHub issue

The elevation prop applied to the bottom navigation bar doesn’t seem to work in the integration with react-navigation.

Possible workaround, apply also borderTopWidth: 0 to the style.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

8reactions
timomehcommented, Feb 27, 2017

Thanks for moving the issue over here. 🙂

One thing which really bugs me in the Material Design Guidelines, is that the elevation-shadow in the Bottom Navigation is inconsistent. In some examples you can clearly see a shadow. In others you can’t. The examples in the Behaviour Section look like there is no shadow at all. Maybe a half-transparent border. Since the elevation is mostly a bottom-shadow (besides affecting the order of overlapping views), this clearly visible shadow just can’t be achived with the elevation API.

Uuuuuggggh, sorry, this really drives me nuts. 😄

Nonetheless it’s veeery strange that the elevation is only visible with a border-style, even if it’s 0. And it’s not a Problem with the react-navigation integration, the standalone version has the same thing going on.

@alvaromb My initial thought was, that it may be related to { overflow: 'hidden' } in ./lib/BottomNavigation.js#L156. I removed it, but the behaviour is still the same. If you have any idea why this could happen, or have some time to track this, I would be more than happy. 😃

For anybody having trouble with setting the elevation

Use style: { borderTopWidth: 0, elevation: 8 }. I don’t know why.

2reactions
YasirSherzadcommented, Oct 11, 2017

@timomeh nvm, I solved the problem doing this:

tabBarOptions: {
      style: {
          marginBottom: 1
      }
}

none of the elevation worked out for me, I still prefer a decent solution with elevation

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android "elevation" not showing a shadow - Stack Overflow
the right way to get a child view to show shadow is to set padding on the parent and set android:clipToPadding="false" on that...
Read more >
Elevation Doesn't Work / Broken? - Apple Community
Elevation Doesn't Work / Broken? I've been puzzling over this for a few hours now. I can't seem to make elevation work.
Read more >
My fenix 3/HR or tactix Bravo Elevation is Not Correct
Run low pressure, warm water over the sensor port. · Gently remove any visible debris. IMPORTANT: Do not put any objects into the...
Read more >
Elevation & shadows - Material Design
Elevation (Android) An arrow that points down when collapsed and points up when expanded. Elevation is the relative depth, or distance, between two...
Read more >
My Elevation - Apps on Google Play
My Elevation uses web services to get your precise surface elevation based on your current location. This is far more accurate than the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found