Commit 27345f2b by tungnq

TODO: Đã fix giao diện thành công

parent 48881347
...@@ -4,6 +4,7 @@ import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; ...@@ -4,6 +4,7 @@ import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import i18n from '../helper/i18/i18n'; import i18n from '../helper/i18/i18n';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import R from '../assets/R'; import R from '../assets/R';
import { StyleSheet , Platform} from 'react-native';
import Home from '../screens/home'; import Home from '../screens/home';
import ELearning from '../screens/elearning'; import ELearning from '../screens/elearning';
...@@ -51,7 +52,7 @@ const TabNavigator = props => { ...@@ -51,7 +52,7 @@ const TabNavigator = props => {
tabBarIcon: ({ focused }) => ( tabBarIcon: ({ focused }) => (
<Image <Image
source={focused ? R.images.icHomeSel : R.images.icHomeUnSel} source={focused ? R.images.icHomeSel : R.images.icHomeUnSel}
style={{ width: '50%', height: '50%', resizeMode: 'contain' }} style={styles.tabBarIcon}
/> />
), ),
}} }}
...@@ -65,7 +66,7 @@ const TabNavigator = props => { ...@@ -65,7 +66,7 @@ const TabNavigator = props => {
tabBarIcon: ({ focused }) => ( tabBarIcon: ({ focused }) => (
<Image <Image
source={focused ? R.images.icELearing : R.images.icELearingUnSel} source={focused ? R.images.icELearing : R.images.icELearingUnSel}
style={{ width: '50%', height: '50%', resizeMode: 'contain' }} style={styles.tabBarIcon}
/> />
), ),
}} }}
...@@ -78,7 +79,7 @@ const TabNavigator = props => { ...@@ -78,7 +79,7 @@ const TabNavigator = props => {
tabBarIcon: ({ focused }) => ( tabBarIcon: ({ focused }) => (
<Image <Image
source={focused ? R.images.icQrCode : R.images.icQrCodeUnSel} source={focused ? R.images.icQrCode : R.images.icQrCodeUnSel}
style={{ width: '70%', height: '70%', resizeMode: 'contain' }} style={styles.tabBarIcon}
/> />
), ),
}} }}
...@@ -91,7 +92,7 @@ const TabNavigator = props => { ...@@ -91,7 +92,7 @@ const TabNavigator = props => {
tabBarIcon: ({ focused }) => ( tabBarIcon: ({ focused }) => (
<Image <Image
source={focused ? R.images.icNotification : R.images.icNotificationUnSel} source={focused ? R.images.icNotification : R.images.icNotificationUnSel}
style={{ width: '50%', height: '50%', resizeMode: 'contain' }} style={styles.tabBarIcon}
/> />
), ),
}} }}
...@@ -104,7 +105,7 @@ const TabNavigator = props => { ...@@ -104,7 +105,7 @@ const TabNavigator = props => {
tabBarIcon: ({ focused }) => ( tabBarIcon: ({ focused }) => (
<Image <Image
source={focused ? R.images.icProfile : R.images.icProfileUn} source={focused ? R.images.icProfile : R.images.icProfileUn}
style={{ width: '50%', height: '50%', resizeMode: 'contain' }} style={styles.tabBarIcon}
/> />
), ),
}} }}
...@@ -120,3 +121,11 @@ const mapStateToProps = state => { ...@@ -120,3 +121,11 @@ const mapStateToProps = state => {
}; };
export default connect(mapStateToProps, {})(TabNavigator); export default connect(mapStateToProps, {})(TabNavigator);
const styles = StyleSheet.create({
tabBarIcon: {
width: Platform.OS === 'ios' ? 20 : '50%',
height: Platform.OS === 'ios' ? 20 : '50%',
resizeMode: 'contain'
}
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment