File tree Expand file tree Collapse file tree 3 files changed +90
-90
lines changed Expand file tree Collapse file tree 3 files changed +90
-90
lines changed Original file line number Diff line number Diff line change 11/**
2- * Sample React Native App
3- * https://github.com/facebook/react-native
2+ * SplashScreen
3+ * 启动屏
4+ * from:http://www.devio.org
5+ * Author:CrazyCodeBoy
6+ * GitHub:https://github.com/crazycodeboy
7+ 48 * @flow
59 */
610
7- import React , { Component } from 'react' ;
811import {
9- AppRegistry ,
10- StyleSheet ,
11- Text ,
12- View
12+ AppRegistry ,
1313} from 'react-native' ;
1414
15- export default class examples extends Component {
16- render ( ) {
17- return (
18- < View style = { styles . container } >
19- < Text style = { styles . welcome } >
20- Welcome to React Native!
21- </ Text >
22- < Text style = { styles . instructions } >
23- To get started, edit index.android.js
24- </ Text >
25- < Text style = { styles . instructions } >
26- Double tap R on your keyboard to reload,{ '\n' }
27- Shake or press menu button for dev menu
28- </ Text >
29- </ View >
30- ) ;
31- }
32- }
15+ import index from './index.js'
3316
34- const styles = StyleSheet . create ( {
35- container : {
36- flex : 1 ,
37- justifyContent : 'center' ,
38- alignItems : 'center' ,
39- backgroundColor : '#F5FCFF' ,
40- } ,
41- welcome : {
42- fontSize : 20 ,
43- textAlign : 'center' ,
44- margin : 10 ,
45- } ,
46- instructions : {
47- textAlign : 'center' ,
48- color : '#333333' ,
49- marginBottom : 5 ,
50- } ,
51- } ) ;
52-
53- AppRegistry . registerComponent ( 'examples' , ( ) => examples ) ;
17+ AppRegistry . registerComponent ( 'examples' , ( ) => index ) ;
Original file line number Diff line number Diff line change 11/**
2- * Sample React Native App
3- * https://github.com/facebook/react-native
2+ * SplashScreen
3+ * 启动屏
4+ * from:http://www.devio.org
5+ * Author:CrazyCodeBoy
6+ * GitHub:https://github.com/crazycodeboy
7+ 48 * @flow
59 */
610
7- import React , { Component } from 'react' ;
811import {
9- AppRegistry ,
10- StyleSheet ,
11- Text ,
12- View
12+ AppRegistry ,
1313} from 'react-native' ;
1414
15- export default class examples extends Component {
16- render ( ) {
17- return (
18- < View style = { styles . container } >
19- < Text style = { styles . welcome } >
20- Welcome to React Native!
21- </ Text >
22- < Text style = { styles . instructions } >
23- To get started, edit index.ios.js
24- </ Text >
25- < Text style = { styles . instructions } >
26- Press Cmd+R to reload,{ '\n' }
27- Cmd+D or shake for dev menu
28- </ Text >
29- </ View >
30- ) ;
31- }
32- }
15+ import index from './index.js'
3316
34- const styles = StyleSheet . create ( {
35- container : {
36- flex : 1 ,
37- justifyContent : 'center' ,
38- alignItems : 'center' ,
39- backgroundColor : '#F5FCFF' ,
40- } ,
41- welcome : {
42- fontSize : 20 ,
43- textAlign : 'center' ,
44- margin : 10 ,
45- } ,
46- instructions : {
47- textAlign : 'center' ,
48- color : '#333333' ,
49- marginBottom : 5 ,
50- } ,
51- } ) ;
52-
53- AppRegistry . registerComponent ( 'examples' , ( ) => examples ) ;
17+ AppRegistry . registerComponent ( 'examples' , ( ) => index ) ;
Original file line number Diff line number Diff line change 1+ /**
2+ * SplashScreen
3+ * 启动屏
4+ * from:http://www.devio.org
5+ * Author:CrazyCodeBoy
6+ * GitHub:https://github.com/crazycodeboy
7+ 8+ * @flow
9+ */
10+ 'use strict' ;
11+
12+
13+ import React , { Component } from 'react' ;
14+ import {
15+ StyleSheet ,
16+ View ,
17+ Text ,
18+ TouchableOpacity ,
19+ Linking ,
20+ } from 'react-native'
21+ import SplashScreen from 'react-native-splash-screen'
22+
23+ export default class example extends Component {
24+
25+ componentDidMount ( ) {
26+ SplashScreen . hide ( ) ;
27+ }
28+
29+
30+ render ( ) {
31+ return (
32+ < TouchableOpacity
33+ style = { styles . container }
34+ onPress = { ( e ) => {
35+ Linking . openURL ( 'http://www.devio.org/' ) ;
36+ } }
37+ >
38+ < View >
39+ < Text style = { styles . item } >
40+ SplashScreen 启动屏
41+ </ Text >
42+ < Text style = { styles . item } >
43+ @:http://www.devio.org/
44+ </ Text >
45+ < Text style = { styles . item } >
46+ GitHub:https://github.com/crazycodeboy
47+ </ Text >
48+ < Text style = { styles . item } >
49+ 50+ </ Text >
51+ </ View >
52+ </ TouchableOpacity >
53+ )
54+ }
55+
56+ }
57+
58+ const styles = StyleSheet . create ( {
59+ container : {
60+ flex : 1 ,
61+ backgroundColor : '#f3f2f2' ,
62+ marginTop : 30
63+ } ,
64+ item : {
65+ fontSize : 20 ,
66+ } ,
67+ line : {
68+ flex : 1 ,
69+ height : 0.3 ,
70+ backgroundColor : 'darkgray' ,
71+ } ,
72+ } )
You can’t perform that action at this time.
0 commit comments