-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainScreen.js
More file actions
46 lines (41 loc) · 1.19 KB
/
MainScreen.js
File metadata and controls
46 lines (41 loc) · 1.19 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
'use strict';
import React from 'react';
import {
View,
Image,
Dimensions
} from 'react-native';
import SecondScreen from './SecondScreen'
var ScreenWidth = Dimensions.get('window').width;
var ScreenHeight = Dimensions.get('window').height;
export default class MainScreen extends React.Component {
constructor(props) {
super(props);
this.state = {
content: 'mainscreen'
};
this, setTimeout(this._toSecond.bind(this), 1000);
}
render() {
var _this = this;
return (
<View>
<Image style={{width: ScreenWidth, height: ScreenHeight}}
source={{uri:'http://bpic.588ku.com/back_pic/03/87/96/9057d3c08d43423.jpg!/fw/650/quality/90/unsharp/true/compress/true'}}
resizeMode={Image.resizeMode.stretch}></Image>
</View>
);
}
_toSecond() {
this.props.navigator.replace({
component: SecondScreen, params: {
name: 'lpc'
}
});
// this.props.navigator.push({
// component: SecondScreen, params: {
// name: 'lpc'
// }
// });
}
}