React-native-swiper: (In Android) Images can't be shown when I set the <Swiper > as header of a ListView

Created on 1 Sep 2016  ·  16Comments  ·  Source: leecade/react-native-swiper

i use Swpier work well, but when i set

Most helpful comment

Temp solution:

<ListView
  removeClippedSubviews={false}
/>

All 16 comments

+1

+1

+1

+!

Temp solution:

<ListView
  removeClippedSubviews={false}
/>

@alexesDev He doesn't work. You have no problem.
<ListView style={{flex:1,backgroundColor:'white'}} dataSource={this.state.listData} renderRow={this._renderRow} removeClippedSubviews={false} renderHeader={()=>{return( <View> <Swiper style={styles.wrapper} height={120} showsButtons={false} autoplay={true}> <View> <Image source={ require('../images/banner/1.jpg')} style={{flex: 1,resizeMode:'cover'}} /> </View> <View> <Image source={ require('../images/banner/2.jpg')} style={{flex: 1,resizeMode:'cover'}} /> </View> </Swiper>

I have a similar problem that swiper cannot slide when I add it into a vertical listView as cell.

+1

@alexesDev It's worked

Setting removeClippedSubviews={false} did work,but I need to set removeClippedSubviews to true for save memory

Okay, it seems a bug of react-native

https://github.com/facebook/react-native/issues/4455

+1,安卓无法显示

+1

@alexesDev it still don't work when I set removeClippedSubviews={false}

            <ListView
                dataSource={this.state.dataSource}
                renderRow={(rowData,sectionId,rowId) => this._renderRow(rowData,sectionId,rowId)}
                removeClippedSubviews={false}
                renderHeader={() => this._renderHeader()}
                renderSectionHeader={() => this._renderSectionHeader()}

            />

please check this code ,is it right?

@alexesDev It works! But it can cause another big bug Images fail to render after several minutes of app use

It runs very well on iOS! Android always has more issues!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kylehagler picture kylehagler  ·  3Comments

hadrienbbt picture hadrienbbt  ·  3Comments

commit-master picture commit-master  ·  3Comments

agzuniverse picture agzuniverse  ·  3Comments

ghost picture ghost  ·  3Comments