wix / react-native-navigation

A complete native navigation solution for React Native
https://wix.github.io/react-native-navigation/
MIT License
13.04k stars 2.67k forks source link

[V2] TopBar Issue only when i have scrollview on the page & after updated to RNN 2547 #3970

Closed naiduasn closed 6 years ago

naiduasn commented 6 years ago

Issue Description

TopBar Yesterday i upgraded RNN from version V2- 2431 to V2 - 2547. The reason for the upgrade is this issue #3803. This happens only for the screens where i have scrollview

Steps to Reproduce / Code Snippets / Screenshots

static get options() {
        return {
            topBar: {
                title: {
                    text: 'Horecacart',
                    color: 'white',
                    fontSize: 30,
                    alignment: 'left',
                    fontFamily: 'Cocon-Regular'
                },
                background: {
                    color: '#3880ff'
                },
                ...Platform.select({
                    android: { drawBehind: true },
                    ios: { drawBehind: false, }
                }),
                leftButtons: [
                    {
                        id: 'buttonMenu',
                        icon: iconsMap['bars'],
                        color: 'white',
                    }
                ],
                rightButtons: [],
            },
            statusBar: {
                backgroundColor: '#3880ff'
            }
        };
    }

The render method contains

<ScrollView
                        style={styles.scrollview}
                        scrollEventThrottle={200}
                        directionalLockEnabled={true}
                    >
                        {homePageGrid}
                        {homePageSlide}
                    </ScrollView>
screen shot 2018-09-15 at 11 56 03 pm

Environment

support[bot] commented 6 years ago

We use the issue tracker exclusively for bug reports and feature requests. This issue appears to be a general usage or support question. Instead, please ask a question on Stack Overflow with the react-native-navigation tag.

adamterlson commented 6 years ago

@naiduasn You can try and set contentInsetAdjustmentBehavior on your scroll view:

<ScrollView contentInsetAdjustmentBehavior="never">...</ScrollView>

You may also need to configure the top bar:

topBar:  {
    visible: true,
    translucent: true, // Important
    drawBehind: true,
}