Skip to content

Commit 6f144f0

Browse files
author
Felipe Chaux
committed
react native weather
1 parent a5251db commit 6f144f0

14 files changed

Lines changed: 7848 additions & 0 deletions

weather/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules/**/*
2+
.expo/*
3+
npm-debug.*
4+
*.jks
5+
*.p12
6+
*.key
7+
*.mobileprovision

weather/.watchmanconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

weather/App.js

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
import React from 'react';
2+
import { StyleSheet, Text, View,Platform,TextInput,KeyboardAvoidingView } from 'react-native';
3+
4+
import SearchInput from './components/SearchInput';
5+
6+
7+
export default class App extends React.Component {
8+
render() {
9+
const style={color:'red'};
10+
return (
11+
<KeyboardAvoidingView
12+
style={styles.container}
13+
behavior="padding"
14+
>
15+
<Text style={style}>
16+
Hello, friend I am a basic React Native Componente
17+
</Text>
18+
19+
20+
<Text style={[styles.largeText,styles.textStyle]}>
21+
San Francisco
22+
</Text>
23+
24+
<Text style={[styles.smallText,styles.textStyle]}>
25+
Light Cloud
26+
</Text>
27+
28+
<Text style={[styles.largeText,styles.textStyle]}>24°</Text>
29+
30+
<SearchInput placeholder="Search any city"></SearchInput>
31+
32+
{/*<Image source={require('./image.png')}/>*/}
33+
</KeyboardAvoidingView>
34+
);
35+
}
36+
}
37+
38+
const styles = StyleSheet.create({
39+
container: {
40+
flex: 1,
41+
backgroundColor: '#fff',
42+
alignItems: 'center',
43+
justifyContent: 'center',
44+
},
45+
textStyle:{
46+
textAlign:'center',
47+
/*fontFamily:
48+
Platform.OS==='ios'?'AvenirNext-Regular':'Roboto',*/
49+
...Platform.select({
50+
ios:{
51+
fontFamily:'AvenirNext-Regular',
52+
},
53+
android:{
54+
fontFamily:'Roboto',
55+
},
56+
}),
57+
},
58+
largeText:{
59+
fontSize:44,
60+
},
61+
smallText:{
62+
fontSize:18,
63+
},
64+
textInput:{
65+
backgroundColor:'#666',
66+
color:'white',
67+
height:40,
68+
width:300,
69+
marginTop:20,
70+
marginHorizontal:20,
71+
paddingHorizontal:10,
72+
alignSelf:'center',
73+
},
74+
75+
76+
});

weather/app.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"expo": {
3+
"name": "WeatherApp",
4+
"slug": "weather",
5+
"privacy": "public",
6+
"sdkVersion": "31.0.0",
7+
"platforms": [
8+
"ios",
9+
"android"
10+
],
11+
"version": "1.0.0",
12+
"orientation": "portrait",
13+
"icon": "./assets/icon.png",
14+
"splash": {
15+
"image": "./assets/splash.png",
16+
"resizeMode": "contain",
17+
"backgroundColor": "#ffffff"
18+
},
19+
"updates": {
20+
"fallbackToCacheTimeout": 0
21+
},
22+
"assetBundlePatterns": [
23+
"**/*"
24+
],
25+
"ios": {
26+
"supportsTablet": true
27+
}
28+
}
29+
}

weather/assets/clear.png

229 KB
Loading

weather/assets/hail.jpg

92.8 KB
Loading

weather/assets/icon.png

2.91 KB
Loading

weather/assets/showers.jpg

13.3 KB
Loading

weather/assets/splash.png

7.01 KB
Loading

weather/babel.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = function(api) {
2+
api.cache(true);
3+
return {
4+
presets: ['babel-preset-expo'],
5+
};
6+
};

0 commit comments

Comments
 (0)