-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
82 lines (72 loc) · 1.87 KB
/
App.js
File metadata and controls
82 lines (72 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
Platform,
StyleSheet,
Text,
Image,
ImageBackground,
Animated,
View,
ScrollView
} from 'react-native';
import BackgroundImage from './components/BackgroundImage';
class FadeInView extends React.Component {
state = {
fadeAnim: new Animated.Value(0),
}
componentDidMount() {
Animated.timing( // Animate over time
this.state.fadeAnim, // The animated value to drive
{
toValue: 1, // Animate to opacity: 1 (opaque)
duration: 3000, // Make it take a while
}
).start(); // Starts the animation
}
render() {
let { fadeAnim } = this.state;
return (
<Animated.View // Special animatable View
style={{
...this.props.style,
opacity: fadeAnim, // Bind opacity to animated value
}}
>
{this.props.children}
</Animated.View>
);
}
}
export default class App extends Component {
render() {
return (
<View style={styles.container}>
<BackgroundImage
source={require('./images/jamiaca_beach.png')}
originalWidth = {1440}
originalHeight = {2560}
></BackgroundImage>
<FadeInView style = {{height:250 , width:250,position:'absolute'}}>
<Animated.Image style = {{position:'absolute', height:250 , width:250,resizeMode:'contain'}} source={require('./images/NCB-Financial-Group.png')} ></Animated.Image>
</FadeInView>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
welcome: {
fontSize: 20,
textAlign: 'center',
color: 'white',
},
});