1- import React , { PureComponent } from 'react' ;
2- import { View , Text , Button } from 'react-native' ;
3- import { GlobalStyle } from '../../theme/global' ;
4- import { Container , Header , Content } from '../../components/index' ;
1+ import React , { PureComponent } from 'react' ;
2+ import { View , Text , Image , StyleSheet } from 'react-native' ;
3+ import { GlobalStyle } from '../../theme/global' ;
4+ import {
5+ Container , Header , Content , HeaderBody ,
6+ HeaderRight ,
7+ HeaderLeft , Button
8+ } from '../../components/index' ;
59
610export default class AboutScreen extends PureComponent {
11+
712 render ( ) {
13+ const images = [
14+ 'https://cdn.dribbble.com/users/4103091/screenshots/7353178/media/6d1a3a06961c0dcfd513ffe241636472.png' ,
15+ 'https://cdn.dribbble.com/users/4103091/screenshots/7154300/media/7839c89716a90284e0c52595efb61dd5.jpg' ,
16+ 'https://cdn.dribbble.com/users/4103091/screenshots/7144043/media/d656c920c640137820705cb7f2c74b8d.png' ,
17+ 'https://cdn.dribbble.com/users/4103091/screenshots/7161471/media/5a8d8a0ca7ef17438d3abb153f65964a.png' ,
18+ 'https://cdn.dribbble.com/users/4103091/screenshots/7182137/media/e62354aab046eaa95906378326401ae3.jpg' ,
19+ 'https://cdn.dribbble.com/users/4103091/screenshots/7206198/media/3abe7e52b17db092707f8571acdc1692.jpg' ,
20+ 'https://cdn.dribbble.com/users/4103091/screenshots/7206610/media/ffb593de453a0ec31a07d87032d874bb.jpg'
21+ ]
822 return (
923 < Container >
10- < Header
11- barStyle = "dark-content"
12- statusbarColor = "white" >
13- < Text > Header</ Text >
24+ < Header
25+ barStyle = "dark-content"
26+ statusbarColor = "white" >
27+ < HeaderLeft />
28+ < HeaderBody >
29+ < Text style = { [ GlobalStyle . headerTitle ] } > About</ Text >
30+ </ HeaderBody >
31+ < HeaderRight />
1432 </ Header >
1533 < Content >
16- < Text > AboutScreen</ Text >
17- < Button
18- onPress = { ( ) => this . props . navigation . push ( 'details' ) }
19- title = "go to details" > </ Button >
34+ < View style = { {
35+ flexDirection : 'column' ,
36+ width : '100%' ,
37+ justifyContent : 'center' ,
38+ alignItems : 'center' ,
39+ marginBottom : 30 ,
40+ } } >
41+ < Text style = { style . title } > About Screen</ Text >
42+
43+ < Button
44+ style = { { backgroundColor : 'green' } }
45+ onClick = { ( ) => this . props . navigation . push ( 'details' ) } >
46+ < Text style = { { color : 'white' } } > Details Screen</ Text >
47+ </ Button >
48+ </ View >
49+
50+ { images . map ( ( image , index ) => (
51+ < View key = { index } style = { style . imageContainer } >
52+ < Image style = { style . image }
53+ loadingIndicatorSource = { require ( '../../assets/icons/pre-loader.gif' ) }
54+ defaultSorce = { require ( '../../assets/icons/pre-loader.gif' ) }
55+ source = { { uri : image } }
56+ />
57+ </ View >
58+ ) ) }
2059 </ Content >
21-
60+
2261 </ Container >
2362 ) ;
2463 }
2564}
65+
66+ const style = StyleSheet . create ( {
67+ title : {
68+ fontSize : 18 ,
69+ marginBottom : 15 ,
70+ fontWeight : 'bold'
71+ } ,
72+ imageContainer : {
73+ height : 250 ,
74+ marginBottom : 20 ,
75+ borderRadius : 5 ,
76+ shadowColor : "#000" ,
77+ shadowOffset : {
78+ width : 0 ,
79+ height : 4 ,
80+ } ,
81+ shadowOpacity : 0.32 ,
82+ shadowRadius : 5.46 ,
83+ backgroundColor : 'white' ,
84+ elevation : 9 ,
85+ } ,
86+ image : {
87+ width : '100%' ,
88+ height : 250 ,
89+ resizeMode : 'stretch' ,
90+ borderRadius : 5 ,
91+ }
92+ } )
0 commit comments