small hack, todo: find better way

This commit is contained in:
feruz 2019-12-05 05:16:12 +02:00
parent 82b4891f64
commit 9ab5585fe9
2 changed files with 16 additions and 2 deletions

View File

@ -23,9 +23,16 @@ export default EStyleSheet.create({
alignItems: 'center', alignItems: 'center',
zIndex: 0, zIndex: 0,
paddingBottom: 20, paddingBottom: 20,
paddingRight: 3,
width: (deviceWidth - 38) / 5, width: (deviceWidth - 38) / 5,
}, },
navItem2: {
paddingRight: 5,
paddingLeft: 2,
},
navItem3: {
paddingRight: 0,
paddingLeft: 2,
},
circle: { circle: {
bottom: 25, bottom: 25,
}, },

View File

@ -144,7 +144,14 @@ const TabBarItem = ({ icon, selectedIcon, index, selected, onPress, showIcon, di
if (selected) { if (selected) {
if (showIcon) { if (showIcon) {
return ( return (
<TouchableHighlight underlayColor="transparent" style={styles.navItem}> <TouchableHighlight
underlayColor="transparent"
style={[
styles.navItem,
(index === 0 || index === 1) && styles.navItem2,
(index === 3 || index === 4) && styles.navItem3,
]}
>
<View style={styles.circle}>{selectedIcon || icon}</View> <View style={styles.circle}>{selectedIcon || icon}</View>
</TouchableHighlight> </TouchableHighlight>
); );