folofse / androw

Shadows in React Native for Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can just set the background View, not all the child views?

hejun041 opened this issue · comments

Like the CardView,not all the items

Hi, I suspect that the children are not visible when the bitmap representation of the shadow get created, at the moment the parent gets rendered. I will look in to it.

In my case I use a View to be the first child ,like this:
<Androw style={[this.props.style, { backgroundColor: 'transparent' }]} > <View style={this.props.style}> {this.props.children} </View> </Androw>
And you can change the View to Touchable Component

Hi sorry for late feedback. It adds the shadow to the nearest child, so if a view is between it will recieve the shadow. I would reccomend you to add Androw on each child that should have the shadow, or in you case on each card.

In this example the shadow gets applied to the view instead of the which lies inside the view.

Screenshot 2020-01-16 at 08 59 50

thx a lot