When using Swiper, it is found that under the Android machine, if the scrollable components (such as: Flatlist, Sectionlist,listview,scrollview, etc.) are used, Swiper will not display properly. Click to view original text
Solution:
Constructor (props) { super (props); This.state = { Listdata:testdata, onrefresh:false, swipershow:false, };} Componentdidmount () { setTimeout (() =>{ this.setstate ({swipershow:true}); },0)}
Renderswiper= () =>{ if (this.state.swiperShow) { return ( <swiper height={150} autoplay={true} Activedotcolor= "#fff" > {banner_list.map (item, i) = { return <image source={require ('). /.. /.. /img/banner.jpeg ')} key={i} style={styles.banner}/>; })} </Swiper> ); } else { return <view style={{height:150}}></view>; }}
Then in render () the place where the swiper is to be rendered calls {This.renderswiper ()}
React-native using Swiper not shown on Android