I believe you'll just need style the image correctly using position: 'absolute'
with the correct top
and left
values. Below is an example.
NOTE: if the images are from network (so you don't know the size beforehand), you may style the image inline ex. style={{ width: img.width, height: img.height }}
after fetching the image size (React Native Retrieve Actual Image Sizes)
import { Dimensions, StyleSheet, View, Image } from 'react-native';
const { width, height } = Dimensions.get('window');
const styles = StyleSheet.create({
container: {
flex: 1
},
background: {
width,
height
},
blue: {
position: 'absolute',
top: 10,
left: 10,
width: 200,
height: 200
},
green: {
position: 'absolute',
top: 100,
left: 200,
width: 200,
height: 200
},
red: {
position: 'absolute',
top: 400,
left: 150,
width: 200,
height: 200
}
});
const Demo = () => (
<View style={styles.container}>
<Image
style={styles.background}
source={{ uri: 'http://via.placeholder.com/1080x1920' }}
/>
<Image
style={styles.blue}
source={{ uri: 'http://via.placeholder.com/200/0000ff' }}
/>
<Image
style={styles.green}
source={{ uri: 'http://via.placeholder.com/200/008000' }}
/>
<Image
style={styles.red}
source={{ uri: 'http://via.placeholder.com/200/ff0000' }}
/>
</View>
);
export default Demo;
RESULT: