forked from MHassanA98/LSD
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Screen and navigator, along with fonts and images
- Loading branch information
1 parent
3479c5b
commit 9523a88
Showing
18 changed files
with
243 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,114 +1,56 @@ | ||
/** | ||
* Sample React Native App | ||
* https://github.com/facebook/react-native | ||
* | ||
* @format | ||
* @flow strict-local | ||
*/ | ||
|
||
import React, { useState } from 'react'; | ||
// import * as Font from 'expo-font'; | ||
// import { AppLoading } from 'expo'; | ||
import StackNavigator from './routes/HomeStack' | ||
import { StyleSheet, Text, View, Image, ImageBackground } from 'react-native'; | ||
|
||
import React from 'react'; | ||
import { | ||
SafeAreaView, | ||
StyleSheet, | ||
ScrollView, | ||
View, | ||
Text, | ||
StatusBar, | ||
} from 'react-native'; | ||
export default function App() { | ||
// const [fontsLoaded, setFontsLoaded] = useState(false); | ||
return( | ||
|
||
import { | ||
Header, | ||
LearnMoreLinks, | ||
Colors, | ||
DebugInstructions, | ||
ReloadInstructions, | ||
} from 'react-native/Libraries/NewAppScreen'; | ||
<StackNavigator/> | ||
|
||
const App: () => React$Node = () => { | ||
return ( | ||
<> | ||
<StatusBar barStyle="dark-content" /> | ||
<SafeAreaView> | ||
<ScrollView | ||
contentInsetAdjustmentBehavior="automatic" | ||
style={styles.scrollView}> | ||
<Header /> | ||
{global.HermesInternal == null ? null : ( | ||
<View style={styles.engine}> | ||
<Text style={styles.footer}>Engine: Hermes</Text> | ||
</View> | ||
)} | ||
<View style={styles.body}> | ||
<View style={styles.sectionContainer}> | ||
<Text style={styles.sectionTitle}>Step One</Text> | ||
<Text style={styles.sectionDescription}> | ||
Edit <Text style={styles.highlight}>App.js</Text> to change this | ||
screen and then come back to see your edits. | ||
</Text> | ||
</View> | ||
<View style={styles.sectionContainer}> | ||
<Text style={styles.sectionTitle}>See Your Changes</Text> | ||
<Text style={styles.sectionDescription}> | ||
<ReloadInstructions /> | ||
</Text> | ||
</View> | ||
<View style={styles.sectionContainer}> | ||
<Text style={styles.sectionTitle}>Debug</Text> | ||
<Text style={styles.sectionDescription}> | ||
<DebugInstructions /> | ||
</Text> | ||
</View> | ||
<View style={styles.sectionContainer}> | ||
<Text style={styles.sectionTitle}>Learn More</Text> | ||
<Text style={styles.sectionDescription}> | ||
Read the docs to discover what to do next: | ||
</Text> | ||
</View> | ||
<LearnMoreLinks /> | ||
</View> | ||
</ScrollView> | ||
</SafeAreaView> | ||
</> | ||
); | ||
}; | ||
// <View style={styles.home}> | ||
// <Text style={styles.text}> | ||
// HELLO HOME | ||
// </Text> | ||
// <ImageBackground source= {require('./assets/images/food')}> | ||
|
||
// </ImageBackground> | ||
|
||
const styles = StyleSheet.create({ | ||
scrollView: { | ||
backgroundColor: Colors.lighter, | ||
}, | ||
engine: { | ||
position: 'absolute', | ||
right: 0, | ||
}, | ||
body: { | ||
backgroundColor: Colors.white, | ||
}, | ||
sectionContainer: { | ||
marginTop: 32, | ||
paddingHorizontal: 24, | ||
}, | ||
sectionTitle: { | ||
fontSize: 24, | ||
fontWeight: '600', | ||
color: Colors.black, | ||
}, | ||
sectionDescription: { | ||
marginTop: 8, | ||
fontSize: 18, | ||
fontWeight: '400', | ||
color: Colors.dark, | ||
}, | ||
highlight: { | ||
fontWeight: '700', | ||
}, | ||
footer: { | ||
color: Colors.dark, | ||
fontSize: 12, | ||
fontWeight: '600', | ||
padding: 4, | ||
paddingRight: 12, | ||
textAlign: 'right', | ||
}, | ||
}); | ||
|
||
export default App; | ||
|
||
|
||
// </View> | ||
// if (fontsLoaded) { | ||
// return ( | ||
// <Navigator /> | ||
// ); | ||
// } else { | ||
// return ( | ||
// <AppLoading | ||
// startAsync={getFonts} | ||
// onFinish={() => setFontsLoaded(true)} | ||
// /> | ||
// ) | ||
// } | ||
) | ||
} | ||
|
||
const styles=StyleSheet.create({ | ||
home: { | ||
flex: 0, | ||
backgroundColor:'red' | ||
|
||
}, | ||
text: { | ||
fontFamily: 'Roboto-Bold', | ||
// fontWeight: 'bold', | ||
paddingLeft: 16, | ||
fontSize: 32 | ||
} | ||
|
||
|
||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
/** | ||
* Sample React Native App | ||
* https://github.com/facebook/react-native | ||
* | ||
* @format | ||
* @flow strict-local | ||
*/ | ||
|
||
import React from 'react'; | ||
import { | ||
SafeAreaView, | ||
StyleSheet, | ||
ScrollView, | ||
View, | ||
Text, | ||
StatusBar, | ||
} from 'react-native'; | ||
|
||
import { | ||
Header, | ||
LearnMoreLinks, | ||
Colors, | ||
DebugInstructions, | ||
ReloadInstructions, | ||
} from 'react-native/Libraries/NewAppScreen'; | ||
|
||
const App: () => React$Node = () => { | ||
return ( | ||
<> | ||
<StatusBar barStyle="dark-content" /> | ||
<SafeAreaView> | ||
<ScrollView | ||
contentInsetAdjustmentBehavior="automatic" | ||
style={styles.scrollView}> | ||
<Header /> | ||
{global.HermesInternal == null ? null : ( | ||
<View style={styles.engine}> | ||
<Text style={styles.footer}>Engine: Hermes</Text> | ||
</View> | ||
)} | ||
<View style={styles.body}> | ||
<View style={styles.sectionContainer}> | ||
<Text style={styles.sectionTitle}>Step One</Text> | ||
<Text style={styles.sectionDescription}> | ||
Edit <Text style={styles.highlight}>App.js</Text> to change this | ||
screen and then come back to see your edits. | ||
</Text> | ||
</View> | ||
<View style={styles.sectionContainer}> | ||
<Text style={styles.sectionTitle}>See Your Changes</Text> | ||
<Text style={styles.sectionDescription}> | ||
<ReloadInstructions /> | ||
</Text> | ||
</View> | ||
<View style={styles.sectionContainer}> | ||
<Text style={styles.sectionTitle}>Debug</Text> | ||
<Text style={styles.sectionDescription}> | ||
<DebugInstructions /> | ||
</Text> | ||
</View> | ||
<View style={styles.sectionContainer}> | ||
<Text style={styles.sectionTitle}>Learn More</Text> | ||
<Text style={styles.sectionDescription}> | ||
Read the docs to discover what to do next: | ||
</Text> | ||
</View> | ||
<LearnMoreLinks /> | ||
</View> | ||
</ScrollView> | ||
</SafeAreaView> | ||
</> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
scrollView: { | ||
backgroundColor: Colors.lighter, | ||
}, | ||
engine: { | ||
position: 'absolute', | ||
right: 0, | ||
}, | ||
body: { | ||
backgroundColor: Colors.white, | ||
}, | ||
sectionContainer: { | ||
marginTop: 32, | ||
paddingHorizontal: 24, | ||
}, | ||
sectionTitle: { | ||
fontSize: 24, | ||
fontWeight: '600', | ||
color: Colors.black, | ||
}, | ||
sectionDescription: { | ||
marginTop: 8, | ||
fontSize: 18, | ||
fontWeight: '400', | ||
color: Colors.dark, | ||
}, | ||
highlight: { | ||
fontWeight: '700', | ||
}, | ||
footer: { | ||
color: Colors.dark, | ||
fontSize: 12, | ||
fontWeight: '600', | ||
padding: 4, | ||
paddingRight: 12, | ||
textAlign: 'right', | ||
}, | ||
}); | ||
|
||
export default App; |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { createStackNavigator } from 'react-navigation-stack'; | ||
import { createAppContainer } from 'react-navigation'; | ||
import Home from '../screens/home'; | ||
// import ReviewDetails from '../screens/reviewDetails'; | ||
|
||
const screens = { | ||
Home: { | ||
screen: Home, | ||
}, | ||
// ReviewDetails: { | ||
// screen: ReviewDetails, | ||
// }, | ||
}; | ||
|
||
// home stack navigator screens | ||
const HomeStack = createStackNavigator(screens, { | ||
defaultNavigationOptions: { | ||
headerTintColor: '#444', | ||
headerStyle: { backgroundColor: '#d00f16', height: 60 } | ||
} | ||
}); | ||
|
||
export default createAppContainer(HomeStack); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
|
||
import React, { useState } from 'react'; | ||
// import * as Font from 'expo-font'; | ||
// import { AppLoading } from 'expo'; | ||
// import Navigator from './route/NavigDraw' | ||
import { StyleSheet, Text, View, Image, ImageBackground } from 'react-native'; | ||
|
||
export default function Home() { | ||
// const [fontsLoaded, setFontsLoaded] = useState(false); | ||
return( | ||
|
||
<View style={styles.home}> | ||
|
||
<Image source= {require('../assets/images/Kitchen.jpg')} style={styles.image}> | ||
<Text style={styles.text}> | ||
HELLO HOME | ||
</Text> | ||
</Image> | ||
|
||
</View> | ||
// if (fontsLoaded) { | ||
// return ( | ||
// <Navigator /> | ||
// ); | ||
// } else { | ||
// return ( | ||
// <AppLoading | ||
// startAsync={getFonts} | ||
// onFinish={() => setFontsLoaded(true)} | ||
// /> | ||
// ) | ||
// } | ||
) | ||
} | ||
|
||
const styles=StyleSheet.create({ | ||
home: { | ||
flex: 0, | ||
backgroundColor:'red' | ||
|
||
}, | ||
text: { | ||
fontFamily: 'Roboto-Bold', | ||
// fontWeight: 'bold', | ||
paddingLeft: 16, | ||
fontSize: 32 | ||
}, | ||
image:{ | ||
justifyContent: 'center', | ||
alignItems: 'center' | ||
} | ||
|
||
|
||
|
||
}) |