Browse Source

Adds a page for news displayment

Carla Ramos 1 year ago
parent
commit
39e41125e8
1 changed files with 19 additions and 1 deletions
  1. 19
    1
      App.js

+ 19
- 1
App.js View File

94
 			<Image source={require('./testimg.gif')} />
94
 			<Image source={require('./testimg.gif')} />
95
 			
95
 			
96
 		 </View>
96
 		 </View>
97
+		</ScrollView></View>,
98
+
99
+
100
+		newsView:
101
+		<View style = {styles.containerbackground}>
102
+		<ScrollView style={styles.scrollView}>
103
+		 <View style = {styles.container}>
104
+		  
105
+		  
106
+			<Text style={styles.intro}>Noticias</Text>
107
+			 
108
+			<Image source={require('./testimg.gif')} />
109
+			
110
+		 </View>
97
 		</ScrollView></View>
111
 		</ScrollView></View>
112
+
113
+		
98
 	}
114
 	}
99
 
115
 
100
 
116
 
101
 
117
 
118
+
102
 class App extends React.Component {
119
 class App extends React.Component {
103
 
120
 
104
 //current state
121
 //current state
107
 //state changing functions
124
 //state changing functions
108
 setHome = () => this.setState({ current: states.welcome })
125
 setHome = () => this.setState({ current: states.welcome })
109
 setData = () => this.setState({ current: states.dataView })
126
 setData = () => this.setState({ current: states.dataView })
127
+setNews = () => this.setState({ current: states.newsView })
110
 	
128
 	
111
 	
129
 	
112
 	//render app
130
 	//render app
119
 					<Text style={styles.sub}> Navegador</Text>
137
 					<Text style={styles.sub}> Navegador</Text>
120
 						<View style = {styles.buttons}>
138
 						<View style = {styles.buttons}>
121
 			 		 			<Button
139
 			 		 			<Button
122
-								 onPress = {this.setHome}
140
+								onPress = {this.setNews}
123
 				 				title = "Noticias"
141
 				 				title = "Noticias"
124
 				 				color = "blue"
142
 				 				color = "blue"
125
 			  					/>
143
 			  					/>