Shadow not working on Android
See original GitHub issueBug
Trying to follow guide on adding shadow to BottomSheetModal, only iOS seems to work.
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | 4.1.3 |
react-native | 0.65.1 |
react-native-reanimated | 2.2.3 |
react-native-gesture-handler | 1.10.3 |
Steps To Reproduce
- Just use the code in this link: https://gorhom.github.io/react-native-bottom-sheet/modal/usage
- Add the style to BottomSheetModal
shadowColor: 'pink',
shadowOffset: {
width: 0,
height: 12,
},
shadowOpacity: 0.58,
shadowRadius: 16.0,
elevation: 24,
- See the result
Describe what you expected to happen:
- Android should show the shadow correctly
Reproducible sample code
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:7
Top Results From Across the Web
Android "elevation" not showing a shadow
I've been playing around with shadows on Lollipop for a bit and this is what I've found: It appears that a parent ViewGroup...
Read more >shadow not working on my android tablet :( | Community
Hello I am trying to connect to Shadow from a cheap android tablet but it does not work. It says that streaming services...
Read more >Shadow on Android TV not working : r/ShadowPC
My TV is connected over an GBit-Ethernet-Cable to my network and 4K Streaming works flawless. So it's not the connection speed.
Read more >Create Shadows and Clip Views
Customize View Shadows and Outlines ... The bounds of a view's background drawable determine the default shape of its shadow. Outlines represent ...
Read more >React Native Shadow is Missing on iOS but is Okay on Android
Turns out on iOS, the shadow is part of the UI component that you define it at, which results in removing the shadow,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I solved the issue by adding a background colour
The
elevation
property on Android is very inflexible, and so I opted for a custom handle component with a shadow applied using react-native-shadow-2.The
SheetHandle
component is then applied to theBottomSheet
via thehandleComponent
prop:The results: