Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ImageBackground in React Native

<ImageBackground source={require('background image path')} style={{width: '100%', height: '100%'}}>
   <View style={{position: 'absolute', top: 0, left: 0, right: 0, bottom: 0, justifyContent: 'center', alignItems: 'center'}}>
     <Text>Centered text</Text>
   </View>
</ImageBackground>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ImageBackground #React #Native
ADD COMMENT
Topic
Name
5+8 =