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

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

Open
yongqianvip opened this issue Sep 1, 2016 · 16 comments

Comments

@yongqianvip
Copy link

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

@yongqianvip yongqianvip changed the title (In Android) Images can't be shown when I set the <Swiper > as header of a list (In Android) Images can't be shown when I set the <Swiper > as header of a ListView Sep 1, 2016
@leon2011leon
Copy link

+1

2 similar comments
@alexesDev
Copy link

+1

@289420843
Copy link

+1

@change9326
Copy link

+!

@alexesDev
Copy link

Temp solution:

<ListView
  removeClippedSubviews={false}
/>

@change9326
Copy link

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

@santong
Copy link

santong commented Oct 11, 2016

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

@bawn
Copy link

bawn commented Oct 18, 2016

+1

@bawn
Copy link

bawn commented Oct 18, 2016

@alexesDev It's worked

@animabear
Copy link

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

@animabear
Copy link

Okay, it seems a bug of react-native

facebook/react-native#4455

@q351941406
Copy link

+1,安卓无法显示

@zhouwu5
Copy link

zhouwu5 commented Dec 5, 2016

+1

@guoliang1206
Copy link

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

@Liqiankun
Copy link

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

@Liqiankun
Copy link

Liqiankun commented Aug 21, 2017

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

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