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

Carousel child content not visible in screen #14

Open
Anandks1993 opened this issue Feb 25, 2018 · 4 comments
Open

Carousel child content not visible in screen #14

Anandks1993 opened this issue Feb 25, 2018 · 4 comments

Comments

@Anandks1993
Copy link

I used the example on the page and the children is not in visible mode. Only the indicators are visible. I don't know why. Please suggest any idea if you guys have any.

The following is the code I used.

<View style={{
                flex: 1,
                justifyContent: 'center',
                alignItems: 'center',
 }}>
            <View style={styles.container}>
                <Carousel
                    width={375}
                    height={300}
                    animate={false}
                    >
                        <View style={styles.contentContainer}>
                            <Text>Page 1</Text>
                        </View>
                        <View style={styles.contentContainer}>
                            <Text>Page 2</Text>
                        </View>
                        <View style={styles.contentContainer}>
                            <Text>Page 3</Text>
                        </View>
                </Carousel>
            </View>
    </View>

And the following is the snapshot for the screen.

screenshot_1519556926

@Anandks1993 Anandks1993 changed the title Child content not viewing in screen Child content not visible in screen Feb 25, 2018
@Anandks1993 Anandks1993 changed the title Child content not visible in screen Carousel child content not visible in screen Feb 25, 2018
@deniss-y
Copy link

deniss-y commented Mar 8, 2018

Hi, @Anandks1993
Have same issue. Did you find a workaround?

@Anandks1993
Copy link
Author

@th0rv I tried the above with react-native-material-bottom-navigation, I couldn't able to find a workaround with that. So I moved to nativebase(https://docs.nativebase.io/Components.html#footer-tabs-def-headref) which has footer tab in it, I could able to use this package with that.

@fengxiongjiang
Copy link

i encountered similar problem, but im using react-navigation tab-navigator. When the app loaded, the carousel is empty, after navigate to another screen and back to the initial page the carousel then able to render its children. I manage to solve it by adding a timer, after 1 second i set a boolean state to true in order to render the carousel.

@aracchi
Copy link

aracchi commented Dec 15, 2018

@fengxiongjiang hi do you have an example of your workaround? im stuck at the same thing

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

4 participants