0
votes

import React, { Component } from 'react' import { View, StyleSheet, Text, Image, ScrollView, Animated } from 'react-native';

class App extends Component {

constructor(props) { super(props) this.state = { scrollY: new Animated.Value(0) } }

render() {

const headerheight = this.state.scrollY.interpolate({
  inputRange: [0, 100],
  outputRange: [100, 0]
})
return (
  <View style={styles.container}>
    <Animated.View style={styles.appHeader}>
    </Animated.View>
    <ScrollView style={styles.scroll}
      onScroll={Animated.event([{ nativeEvent: { contentOffset: { Y: this.state.scrollY } } }])}>
      <View style={styles.imageView}>
        <Image style={styles.image} source={require('./assets/vikalp.jpg')} />
      </View>
      <View>
        <Text style={styles.textHeader}>Vikalp Chakravorty</Text>
      </View>
    </ScrollView>
  </View>
);
1
what animation are u doing here?Ashwith Saldanha

1 Answers

0
votes

Can you explain you question? What kind of animation do you want to create?

<Animated.View style={styles.appHeader}> in here what kind of props that you pass?

If you give us more detail then we can help.