It seems that with position:absolute
in use an element cannot be centred using justifyContent
or alignItems
. There's a workaround to use marginLeft
but does not display the same for all devices even using dimensions to detect height and width of device.
bottom: {
position: 'absolute',
justifyContent: 'center',
alignItems: 'center',
top: height*0.93,
marginLeft: width*0.18,
},
bottomNav: {
flexDirection: 'row',
},
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…