|
@@ -21,27 +21,27 @@ class CustomTransitionOrigin extends Component {
|
21
|
21
|
render() {
|
22
|
22
|
return (
|
23
|
23
|
<View style={styles.root}>
|
24
|
|
- <Navigation.Element elementId="title1">
|
|
24
|
+ <Navigation.Element elementId='title1'>
|
25
|
25
|
<Text style={styles.h1}>Custom Transition Screen</Text>
|
26
|
26
|
</Navigation.Element>
|
27
|
27
|
<View style={{ flex: 1, justifyContent: 'flex-start' }}>
|
28
|
|
- <TouchableOpacity testID="shared_image1" activeOpacity={0.5} onPress={this.onClickNavigationIcon}>
|
29
|
|
- <Navigation.Element resizeMode="cover" elementId="image1">
|
30
|
|
- <Image resizeMode="cover" style={styles.gyroImage} source={require('../../img/400.jpeg')} />
|
|
28
|
+ <TouchableOpacity testID='shared_image1' activeOpacity={0.5} onPress={this.onClickNavigationIcon}>
|
|
29
|
+ <Navigation.Element resizeMode='cover' elementId='image1'>
|
|
30
|
+ <Image resizeMode='cover' style={styles.gyroImage} source={require('../../img/400.jpeg')} />
|
31
|
31
|
</Navigation.Element>
|
32
|
32
|
</TouchableOpacity>
|
33
|
33
|
<TouchableOpacity activeOpacity={0.5} onPress={this.onClickNavigationIcon}>
|
34
|
|
- <Navigation.Element elementId="image2">
|
|
34
|
+ <Navigation.Element elementId='image2'>
|
35
|
35
|
<Image style={styles.gyroImage} source={require('../../img/2048.jpeg')} />
|
36
|
36
|
</Navigation.Element>
|
37
|
37
|
</TouchableOpacity>
|
38
|
38
|
<TouchableOpacity activeOpacity={0.5} onPress={this.onClickNavigationIcon}>
|
39
|
|
- <Navigation.Element elementId="image3">
|
|
39
|
+ <Navigation.Element elementId='image3'>
|
40
|
40
|
<Image style={styles.gyroImage} source={require('../../img/Icon-87.png')} />
|
41
|
41
|
</Navigation.Element>
|
42
|
42
|
</TouchableOpacity>
|
43
|
43
|
<TouchableOpacity activeOpacity={0.5} onPress={this.onClickNavigationIcon}>
|
44
|
|
- <Navigation.Element elementId="image4">
|
|
44
|
+ <Navigation.Element elementId='image4'>
|
45
|
45
|
<Image style={styles.gyroImage} source={require('../../img/Icon-87.png')} />
|
46
|
46
|
</Navigation.Element>
|
47
|
47
|
</TouchableOpacity>
|
|
@@ -57,7 +57,10 @@ class CustomTransitionOrigin extends Component {
|
57
|
57
|
customTransition: {
|
58
|
58
|
animations: [
|
59
|
59
|
{ type: 'sharedElement', fromId: 'title1', toId: 'title2', startDelay: 0, springVelocity: 0.2, duration: 0.5 },
|
60
|
|
- { type: 'sharedElement', fromId: 'image1', toId: 'customDestinationImage', startDelay: 0, springVelocity: 0.9, springDamping: 0.9, duration: 0.8, interactivePop: true },
|
|
60
|
+ {
|
|
61
|
+ type: 'sharedElement', fromId: 'image1', toId: 'customDestinationImage', startDelay: 0, springVelocity: 0.9,
|
|
62
|
+ springDamping: 0.9, duration: 0.8, interactivePop: true
|
|
63
|
+ },
|
61
|
64
|
{ type: 'sharedElement', fromId: 'image2', toId: 'customDestinationImage2', startDelay: 0, duration: 0.8 },
|
62
|
65
|
{ fromId: 'image4', endY: 50, endX: 50, endAlpha: 0, startDelay: 0, duration: 0.8, springVelocity: 0.5 },
|
63
|
66
|
{ fromId: 'customDestinationParagraph', startY: 50, startAlpha: 0, endAlpha: 1, startDelay: 0, duration: 0.8 }
|
|
@@ -94,4 +97,3 @@ const styles = {
|
94
|
97
|
height: 100
|
95
|
98
|
}
|
96
|
99
|
};
|
97
|
|
-
|