react-native-swiper icon indicating copy to clipboard operation
react-native-swiper copied to clipboard

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

Open yongqianvip opened this issue 10 years ago • 16 comments

i use Swpier work well, but when i set as a header of a list in Android. (iOS is OK)

yongqianvip avatar Sep 01 '16 10:09 yongqianvip

+1

leon2011leon avatar Sep 13 '16 03:09 leon2011leon

+1

alexesDev avatar Sep 19 '16 11:09 alexesDev

+1

sLin90 avatar Sep 21 '16 04:09 sLin90

+!

change9326 avatar Sep 23 '16 06:09 change9326

Temp solution:

<ListView
  removeClippedSubviews={false}
/>

alexesDev avatar Sep 23 '16 07:09 alexesDev

@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>

change9326 avatar Sep 23 '16 07:09 change9326

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

santong avatar Oct 11 '16 08:10 santong

+1

bawn avatar Oct 18 '16 08:10 bawn

@alexesDev It's worked

bawn avatar Oct 18 '16 08:10 bawn

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

animabear avatar Nov 12 '16 10:11 animabear

Okay, it seems a bug of react-native

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

animabear avatar Nov 12 '16 11:11 animabear

+1,安卓无法显示

q351941406 avatar Nov 29 '16 02:11 q351941406

+1

zhouwu5 avatar Dec 05 '16 05:12 zhouwu5

@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?

guoliang1206 avatar Mar 01 '17 06:03 guoliang1206

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

Liqiankun avatar Aug 21 '17 11:08 Liqiankun

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

Liqiankun avatar Aug 21 '17 11:08 Liqiankun