Reputation: 6311
I am trying to understand more about Styling in React Native.
While Dragging a element into bottom container (Yellow), the element goes underneath.
//View
<View style={styles.container}>
<View style={styles.itemContainer}>
<DraggingItem />
</View>
<View style={styles.dropContainer}>
//2nd container
</View>
</View>
//STYLING
container: {
flex: 1,
backgroundColor: '#fff',
},
itemContainer: {
backgroundColor: 'green',
height: (window.height*56)/100,
},
dropContainer: {
flex: 1,
backgroundColor: 'yellow',
height: (window.height*40)/100,
},
// ITEM STYLE
text: {
marginTop: 25,
marginLeft: 5,
marginRight: 5,
// alignItems: 'center',
// justifyContent: 'center',
textAlign: 'center',
color: "#fff"
},
item: {
backgroundColor: "red",
width: window.width,
height: 80,
borderRadius: 15
}
Upvotes: 0
Views: 101