I tried to make a flatlist of image, but each image should be above the others:
<FlatList
style={styles.listAvatar}
data={item.etudiants}
keyExtractor={(item, index) => index.toString()}
renderItem={({ item, index }) => <ItemAvatar urlAvatar={item.avatar} />}
horizontal
/>
const ItemAvatar = ({urlAvatar}:any) => {
return (
<Image
style={{ width: 35, height: 35, borderRadius: 100}}
source={{uri: urlAvatar}}
/>
)
}
So I tried to do something like that:
<Image
style={{ width: 35, height: 35, borderRadius: 100, marginRight: -15}}
source={{uri: urlAvatar}}
/>
But I got:
The last image is cut..
you can try this
<Image
style={{
width: 35,
height: 35,
borderRadius: 100,
left: index * -15,
}}
source={{ uri: urlAvatar }}
/>