leecade / react-native-swiper

The best Swiper component for React Native.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can not autoLayout

genglei01 opened this issue · comments

I used swiper as the following code, and can not autoLayout when changed orientation

<View style={styles.container}>
                <View  style={{flex:1,alignItems:'flex-start'}}>
                    <Swiper>
                        {
                            this.props.navigation.state.params.data.images.map((img)=>{
                                return <Image source={img} style={{ flex:1, resizeMode:'contain', alignSelf:'center'}} key={img}/>
                            })
                        }
                    </Swiper>
                </View>
                <View style={styles.button_container}>
                    
                </View>
            </View>


 container: {
        flex: 1,
        flexDirection:'column'
    },
button_container: {
        flex: 0.1,
        flexDirection: 'row',
        alignItems: 'flex-start',
        justifyContent: 'space-around',
    }

Facing the same issue, more thumbsup can be found here: #371