-
-
Save karanjagota/ab9677675f586a9d5ef74ccccecc8134 to your computer and use it in GitHub Desktop.
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
import React from 'react'; | |
import { StyleSheet,View, Image, Dimensions } from 'react-native'; | |
export default function App() { | |
return ( | |
<View> | |
<Image | |
source={require('..assets/images/my_image.png')} | |
style = {styles.im} | |
/> | |
</View> | |
); | |
} | |
const styles = StyleSheet.create({ | |
im:{ | |
width:Dimensions.get('window').width, | |
height:Dimensions.get('window').height/2 | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment