Comments (3)
This was the test with the renderScrollComponent method
renderParallaxScrollView(props) {
return (
<ParallaxScrollView
stickyHeaderHeight={ STICKY_HEADER_HEIGHT }
parallaxHeaderHeight={ parallaxHeight }
backgroundSpeed={10}
renderBackground={() => (
<View key="background">
<Image
source={{uri: 'https://scontent-cdg2-1.xx.fbcdn.net/v/t1.0-9/11703082_10155826687875565_6900322515805023661_n.jpg?oh=eaef4fae86c2e04fc77db21ce078271d&oe=5A00BB2F'}}
resizeMode={'cover'}
style={{height: parallaxHeight, width: window.width}}
/>
<View
style={{position: 'absolute',
top: 0,
width: window.width,
backgroundColor: 'rgba(0,0,0,.4)',
height: parallaxHeight
}}
/>
</View>
)}
renderForeground={() => (
<BannerCard key="parallax-header" data={this.state.list[0]} />
)}
renderStickyHeader={() => (
<BannerCard key="fixed-header" data={this.state.list[0]} fixed />
)}
/>
)
}
render() {
return (
<View style={styles.container}>
<Timeline
style={styles.list}
data={this.state.data}
circleSize={20}
circleColor='rgb(45,156,219)'
lineColor='rgb(45,156,219)'
timeContainerStyle={{minWidth:52, marginTop: -5}}
timeStyle={{textAlign: 'center', backgroundColor:'#1abc9c', color:'white', padding:5, borderRadius:13}}
descriptionStyle={{color:'gray'}}
options={{
style:{paddingTop:0},
refreshControl: (
<RefreshControl
refreshing={this.state.isRefreshing}
onRefresh={this.onRefresh}
/>
),
renderFooter: this.renderFooter,
onEndReached: this.onEndReached,
renderDetail: this.renderDetail,
//renderScrollComponent={this.renderParallaxScrollView.bind(this)}
renderParallaxScrollView: this.renderParallaxScrollView
}}
renderDetail={this.renderDetail}
renderParallaxScrollView={this.renderParallaxScrollView}
innerCircle={'dot'}
/>
</View>
);
}
from react-native-timeline-listview.
Hi @harrymelka
Yes, you can use renderScrollComponent in options. I try it and it's work with ParallaxScrollView.
my code::
renderParallaxScrollView(props){
return (
<ParallaxScrollView
backgroundColor="blue"
contentBackgroundColor="pink"
parallaxHeaderHeight={300}
renderForeground={() => (
<View style={{ height: 300, flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<Text>Hello World!</Text>
</View>
)}>
<View style={{ height: 500 }}>
<Text>Scroll me</Text>
</View>
</ParallaxScrollView>
)
}
render() {
return(
<Timeline
data={this.data}
innerCircle={'dot'}
options={{
renderScrollComponent: this.renderParallaxScrollView,
}}
/>
)
ps. refreshControl option might not work with ParallaxScrollView.
from react-native-timeline-listview.
Thank you ! I will try it and tell you if I could add the refreshControl
from react-native-timeline-listview.
Related Issues (20)
- renderDetail, NOT renderEvent
- How to add custom view HOT 1
- Modern Timeline update (aka FlatList support) HOT 1
- Add button options for timeline
- Line overlaps the icon
- Animated Line
- Not shown on android
- can we align starting point of circle main label in same line HOT 3
- fontFamily not work for titleStyle HOT 1
- Conditional Rendering of Details for a Row
- Render Circle displays icons to far right of 2 column HOT 3
- 使用renderCircle后圆环位置偏移
- collected in excellent-RN-libs
- two column timeline align columns
- ListView Deprecated HOT 5
- ListView has been removed from React Native HOT 5
- Update required to 0.60.5 HOT 3
- How to set line above the starting timeline circle?
- Is it possible to align circle to center ? HOT 1
- ERROR Invariant Violation: ListView has been removed from React Native. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-timeline-listview.