Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removal of Scene Shadows by getSceneStyle is not applied #2884

Closed
chanchilun opened this issue Feb 15, 2018 · 4 comments
Closed

Removal of Scene Shadows by getSceneStyle is not applied #2884

chanchilun opened this issue Feb 15, 2018 · 4 comments

Comments

@chanchilun
Copy link

chanchilun commented Feb 15, 2018

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0-beta.27
  • react-native v0.51.0

Expected behaviour

I want to remove the shadow of all scenes when the router is wrapped by the SafeAreaView.

Actual behaviour

The getSceneStyle gets is not applied
screen shot 2018-02-15 at 11 02 38 am

Steps to reproduce

My Code

const getSceneStyle = () => ({
    shadowColor: 'transparent',
    shadowOffset: {
        width: 0,
        height: 0
    },
    shadowRadius: 0,
    shadowOpacity: 0
});

export default function AppContainer() {
    return (
        <ApolloProvider client={client} store={store}>
            <Root>
                <SafeAreaView style={AppStyles.appContainer}>
                    <RouterWithRedux
                        getSceneStyle={getSceneStyle}
                        navigator={AppRoutes}/>
                </SafeAreaView>
            </Root>
        </ApolloProvider>
    );
}
@ahmadw
Copy link

ahmadw commented Apr 5, 2018

don't warp your Router with SafeAreaView just warp your content

@thadeubrito
Copy link

same here : (

@aksonov
Copy link
Owner

aksonov commented Aug 8, 2018

Please try to reproduce it with Example project and latest version 4.0.0-beta.40. Feel free to open if the issue still exists

@aksonov aksonov closed this as completed Aug 8, 2018
@haorh
Copy link

haorh commented Apr 25, 2019

Pretty late to answer but for v4.0.6, if you're not using SafeAreaView, you can follow this guy solution

<Scene //<-- highest Scene
   headerStyle= {{
        elevation: 0,
        shadowOpacity: 0,
        borderBottomWidth: 0,
      }}
/>

If you have SafeAreaView, you can do this

<Scene //<-- highest Scene
  cardStyle= {{ shadowColor: 'transparent' }}
/>

refer this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants