Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why shadowColor: '...' - is not applied for drawer styles on Android of “react-native-drawer” component?

May be someone know why "shadowColor" property is not applied for drawer styles on Android? (With iOS looks like everything ok)

Steps to Reproduce / Code Snippets / Screenshots

<Drawer
 type="overlay"
 ...
 styles={{
  drawer: {shadowColor: 'black', shadowOpacity: 0.8, shadowRadius: 2}
   ...
 }}   
>

Screenshot

Environment

react-native-drawer version: 2.3.0

React Native version: 0.41.2

Platform(s) (iOS, Android, or both?): Android

Device info Simulator/Device? - Simulator Android 4.1 (API16), Simulator Android 7.1.1 (API25)

OS version? - MacOS 10.12.3

Debug/Release? - Debug

like image 851
Stich Avatar asked Feb 28 '17 10:02

Stich


1 Answers

shadow will only work on ios. You can try elevation instead which is only available to android also.

shadow props: https://facebook.github.io/react-native/docs/shadow-props.html

check out elevation in View component: http://facebook.github.io/react-native/releases/0.41/docs/view.html#style

like image 127
Damathryx Avatar answered Nov 14 '22 13:11

Damathryx