Work will encounter a variety of problems, ReactNative development is also a hole.
For example, we recently encountered a problem in the development requirements. Add a delete button in the upper right corner of a card type. [Bug Mc-10862] – Position :’ Absolute ‘property is not displayed on Android, which is annoying.
There is a related issue:https://github.com/facebook/r…
Normal desired display effect:
But the actual effect is:
As you can see, the green view is blocked. After consulting relevant information and trying, you can use position:’ Absolute ‘and zIndex in combination to solve this problem. And finally, the code.
<View style={{
position: 'absolute',
zIndex: 99999,
justifyContent: 'center',
alignItems: 'center',
top: 10,
width: 30,
height: 30,
elevation: 99999
}}>
<Image source={require('images/compared/delete_gray.png')} />
</View>