This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
moveToExpand = () => { | |
this.props.navigation.navigate('CollapseExpand', { transition: 'collapseExpand' }); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
moveToSlideFromRight = () => { | |
this.props.navigation.navigate('SlideFromRight'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let CollapseExpand = (index, position) => { | |
const inputRange = [index - 1, index, index + 1]; | |
const opacity = position.interpolate({ | |
inputRange, | |
outputRange: [0, 1, 1], | |
}); | |
const scaleY = position.interpolate({ | |
inputRange, | |
outputRange: ([0, 1, 1]), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let SlideFromRight = (index, position, width) => { | |
const inputRange = [index - 1, index, index + 1]; | |
const translateX = position.interpolate({ | |
inputRange: [index - 1, index, index + 1], | |
outputRange: [width, 0, 0] | |
}) | |
const slideFromRight = { transform: [{ translateX }] } | |
return slideFromRight | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const TransitionConfiguration = () => { | |
return { | |
transitionSpec: { | |
duration: 750, | |
easing: Easing.out(Easing.poly(4)), | |
timing: Animated.timing, | |
useNativeDriver: true, | |
}, | |
screenInterpolator: (sceneProps) => { | |
const { layout, position, scene } = sceneProps; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { View, ScrollView } from 'react-native'; | |
export default class App extends Component { | |
constructor() { | |
super(); | |
this.state = { | |
enabled:true | |
}; | |
} |