Skip to content

Commit 90709fa

Browse files
committed
added headerView polish
1 parent c32cac8 commit 90709fa

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

example/beta-src/ParallaxScrollView.js

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -101,33 +101,24 @@ export default class ParallaxScrollView extends Component {
101101
position: 'relative',
102102
height: newWindowHeight,
103103
opacity: scrollY.interpolate({
104-
inputRange: [-windowHeight, 0, windowHeight / 0.5],
104+
inputRange: [-windowHeight, 0, windowHeight * 0.42 + 65],
105105
outputRange: [1, 1, 0]
106106
})
107107
}}
108108
>
109109
{this.props.headerView ?
110110
this.props.header :
111111
<View style={styles.headerView}>
112-
<View style={styles.headerTextView}>
113-
<Animated.View
114-
style={[styles.avatarView,
115-
{
116-
opacity: scrollY.interpolate({
117-
inputRange: [-windowHeight, 0, windowHeight * 0.42],
118-
outputRange: [1, 1, 0]
119-
})
120-
}
121-
]}
112+
<View
113+
style={styles.avatarView}
122114
>
123115
<Image source={{uri: 'https://s3.amazonaws.com/uifaces/faces/twitter/kfriedson/128.jpg'}} style={{height: 120, width: 120, borderRadius: 60}} />
124-
</Animated.View>
116+
</View>
125117
<View style={{paddingBottom: 20}}>
126118
<Text style={{textAlign: 'center', fontSize: 22, color: 'white', paddingBottom: 5}}>Katy Friedson</Text>
127119
<Text style={{textAlign: 'center', fontSize: 17, color: 'rgba(247,247, 250, 1)', paddingBottom: 5}}>Engineering Manager</Text>
128120
</View>
129121
</View>
130-
</View>
131122
}
132123
</Animated.View>
133124
);
@@ -338,7 +329,7 @@ var styles = StyleSheet.create({
338329
justifyContent: 'center',
339330
alignItems: 'center',
340331
alignSelf: 'center',
341-
paddingBottom: 10,
332+
342333
},
343334
headerTextViewTitle: {
344335
fontSize: 35,

0 commit comments

Comments
 (0)