I was trying to make a cart button on home screen and I want cart always stay on same position but when I'm scrolling cart button also moving up and down. But I don't want that. I have tried Position: 'fixed'; but it's showing error in react native.
<View style={{
flexDirection: 'column-reverse', position: 'absolute', marginTop: 90, zIndex: 999, alignSelf: 'flex-end'}}>
<TouchableOpacity style={styles.carticon} onPress={()=> navigation.navigate('AddtoCart')}>
<Image
style={styles.personicon}
source={require('../assests/img/carticon.png')}></Image>
</TouchableOpacity>
</View>
const styles = StyleSheet.create({
circleimg: {
width: 50,
height: 50,
},
carticon: {
width: 70,
height: 70,
flex: 0,
padding: 2,
marginLeft: 20,
flexDirection: 'row-reverse',
borderRadius: 150 / 2,
backgroundColor: '#fff',
alignItems: 'center',
alignSelf: 'flex-end',
justifyContent: 'center',
},
})