fixed side bar issues and post button enhanced

This commit is contained in:
ue 2018-12-11 16:12:04 +03:00
parent 9e89d96488
commit db561674c7
6 changed files with 20 additions and 24 deletions

View File

@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { TouchableWithoutFeedback, SafeAreaView } from 'react-native';
import { TouchableWithoutFeedback, TouchableOpacity, SafeAreaView } from 'react-native';
import { connect } from 'react-redux';
import ViewOverflow from 'react-native-view-overflow';
@ -58,16 +58,15 @@ class BottomTabBarView extends Component {
style={{
flex: 1,
alignItems: 'center',
justifyContent: 'center',
}}
>
<TouchableWithoutFeedback onPress={() => jumpTo(route.key)}>
<TouchableOpacity onPress={() => jumpTo(route.key)}>
{renderIcon({
route,
focused: index === idx,
tintColor: index === idx ? activeTintColor : inactiveTintColor,
})}
</TouchableWithoutFeedback>
</TouchableOpacity>
</ViewOverflow>
))}
</ViewOverflow>

View File

@ -12,10 +12,13 @@ export default EStyleSheet.create({
position: 'absolute',
},
postButtonWrapper: {
position: 'absolute',
alignItems: 'center',
width: 60,
height: 60,
borderRadius: 60 / 2,
},
postButton: {
flex: 1,
bottom: 25,
backgroundColor: '#357ce6',
alignItems: 'center',

View File

@ -1,5 +1,5 @@
import React from 'react';
import { Animated, TouchableHighlight } from 'react-native';
import { Animated, TouchableOpacity } from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';
// Styles
@ -25,7 +25,7 @@ const SubPostButton = ({
},
]}
>
<TouchableHighlight
<TouchableOpacity
onPress={() => onPress && onPress()}
style={[
styles.subButton,
@ -37,7 +37,7 @@ const SubPostButton = ({
]}
>
<Icon name={icon} size={14} color="#F8F8F8" />
</TouchableHighlight>
</TouchableOpacity>
</Animated.View>
);

View File

@ -42,7 +42,7 @@ class SideMenuContainer extends Component {
accounts.push({
name: 'Add Account',
route: ROUTES.SCREENS.LOGIN,
icon: 'plus-square-o',
icon: 'plus',
id: 'add_account',
});
this.setState({ accounts });

View File

@ -22,19 +22,15 @@ export default EStyleSheet.create({
},
contentView: {
flex: 4,
paddingTop: 15,
},
userAvatar: {
marginLeft: '$deviceWidth / 10',
marginLeft: 32,
},
otherUserAvatar: {
marginLeft: -15,
width: 32,
height: 32,
borderRadius: 32 / 2,
borderWidth: 0.1,
alignSelf: 'center',
borderColor: '$borderColor',
marginLeft: -7,
marginRight: 10,
},
userInfoWrapper: {
alignSelf: 'flex-end',
@ -53,11 +49,13 @@ export default EStyleSheet.create({
marginTop: 2,
},
listItem: {
paddingLeft: '$deviceWidth / 10',
marginVertical: 15,
},
listItemIcon: {
color: '$primaryDarkGray',
color: '$iconColor',
fontSize: 20,
marginRight: 5,
width: 25,
},
listItemText: {
color: '$primaryDarkGray',
@ -82,7 +80,6 @@ export default EStyleSheet.create({
},
itemWrapper: {
flexDirection: 'row',
marginVertical: 10,
marginLeft: '$deviceWidth / 20',
marginLeft: 55,
},
});

View File

@ -134,10 +134,7 @@ class SideMenuView extends Component {
/>
)}
{item.item.username && (
<UserAvatar
username={item.item.username}
style={styles.otherUserAvatar}
/>
<UserAvatar username={item.item.username} style={styles.otherUserAvatar} />
)}
<Text style={styles.listItemText}>
{isAddAccountIconActive