Closed
Description
let React = require('react-native');
let {
Text,
View,
Image,
ListView,
TouchableHighlight,
Component,
ViewPagerAndroid,
AppRegistry,
} = React;
class Main extends Component {
constructor(props) {
super(props);
let ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2});
this.state = {
dataSource: ds.cloneWithRows(new Array(30).join(' ').split(' ').map((s, i)=>`this is item ${i}`)),
};
}
render() {
return (
<View style={{flex: 1}}>
<ListView
dataSource={this.state.dataSource}
renderHeader={()=>{
return (
<ViewPagerAndroid style={{height: 150, backgroundColor: 'lightgreen'}}>
{/* ---- missed these things ---- */}
<View style={{height: 150, backgroundColor: 'red'}}>
<Text>the View object is ok</Text>
</View>
</ViewPagerAndroid>
);
}}
renderRow={(d) => {
return (
<Text style={{textAlign: 'center'}}>{d}</Text>
)
}}
/>
</View>
)
}
}
AppRegistry.registerComponent('tmp', () => Main);
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
[-]I got a bugUse both ListView & ViewPagerAndroid [/-][+]Use both ListView & ViewPagerAndroid that the elements under ViewPagerAndroid will not display[/+][-]Use both ListView & ViewPagerAndroid that the elements under ViewPagerAndroid will not display[/-][+]Render a ViewPagerAndroid in ListView.renderHeader() that the elements under ViewPagerAndroid will not display[/+]facebook-github-bot commentedon Dec 1, 2015
Hey charmingzuo, thanks for reporting this issue!
React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.
react-native
or for more real time interactions, ask on Discord in the #react-native channel.charmingzuo commentedon Dec 1, 2015
I'm using react-native@0.15.0
mc-zone commentedon Dec 10, 2015
+1. had same issue.
charmingzuo commentedon Jan 5, 2016
@mc-zone 有解决方案了吗?
mkonicek commentedon Apr 10, 2016
Hi there! This issue is being closed because it has been inactive for a while.
But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/render-a-viewpagerandroid-in-listviewrenderheader-that-the-elements-under-viewpagerandroid-will-not-display
ProductPains helps the community prioritize the most important issues thanks to its voting feature.
It is easy to use - just login with GitHub.
Also, if this issue is a bug, please consider sending a PR with a fix.
We're a small team and rely on the community for bug fixes of issues that don't affect fb apps.
mrharel commentedon May 5, 2016
so this bug is not going to be fixed? how can we overcome it?
animabear commentedon Nov 12, 2016
+1
Jiasm commentedon Mar 1, 2017
+1
waiting for resolve