Skip to content

Commit

Permalink
Add some fix for icons in IOS, try to android
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomlam committed Feb 28, 2024
1 parent b3c06c5 commit f868e23
Show file tree
Hide file tree
Showing 21 changed files with 18 additions and 8 deletions.
Binary file added android/app/src/assets/fonts/AntDesign.ttf
Binary file not shown.
Binary file added android/app/src/assets/fonts/Entypo.ttf
Binary file not shown.
Binary file added android/app/src/assets/fonts/EvilIcons.ttf
Binary file not shown.
Binary file added android/app/src/assets/fonts/Feather.ttf
Binary file not shown.
Binary file added android/app/src/assets/fonts/FontAwesome.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/assets/fonts/Fontisto.ttf
Binary file not shown.
Binary file added android/app/src/assets/fonts/Foundation.ttf
Binary file not shown.
Binary file added android/app/src/assets/fonts/Ionicons.ttf
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/assets/fonts/MaterialIcons.ttf
Binary file not shown.
Binary file added android/app/src/assets/fonts/Octicons.ttf
Binary file not shown.
Binary file added android/app/src/assets/fonts/SimpleLineIcons.ttf
Binary file not shown.
Binary file added android/app/src/assets/fonts/Zocial.ttf
Binary file not shown.
1 change: 0 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ buildscript {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
}
}

apply plugin: "com.facebook.react.rootproject"
25 changes: 18 additions & 7 deletions src/components/navigators/TabBarNavigation/TabNavigator.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {useEffect} from 'react';
import {ColorValue} from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import {getFocusedRouteNameFromRoute} from '@react-navigation/native';
import {useNavigation} from '@react-navigation/native';

Expand Down Expand Up @@ -33,37 +33,48 @@ const TabNavigator = () => {

const renderIcon =
(name: string) =>
// eslint-disable-next-line react/no-unstable-nested-components
({color, size}: {color: ColorValue; size: number}) =>
<Icon name={name} color={color} size={size} />;
<MaterialCommunityIcons name={name} color={color} size={size} />;
return (
<Tab.Navigator initialRouteName="Carrot">
<Tab.Screen
name="Carrot"
component={CarrotScreen}
options={{
tabBarIcon: renderIcon('carrot'),
tabBarLabel: 'Last Scan',
tabBarIcon: ({color, size}) => (
<MaterialCommunityIcons name="home" color={color} size={size} />
),
}}
/>
<Tab.Screen
name="Plate"
component={PlateScreen}
options={{
tabBarIcon: renderIcon('food'),
tabBarLabel: 'Plats',
tabBarIcon: ({color, size}) => (
<MaterialCommunityIcons name="home" color={color} size={size} />
),
}}
/>
<Tab.Screen
name="QRScan"
component={QRScanScreen}
options={{
tabBarIcon: renderIcon('qrcode-scan'),
tabBarLabel: 'QRScan',
tabBarIcon: ({color, size}) => (
<MaterialCommunityIcons name="home" color={color} size={size} />
),
}}
/>
<Tab.Screen
name="Search"
component={SearchScreen}
options={{
tabBarIcon: renderIcon('magnify'),
tabBarLabel: 'Search',
tabBarIcon: ({color, size}) => (
<MaterialCommunityIcons name="home" color={color} size={size} />
),
}}
/>
<Tab.Screen
Expand Down

0 comments on commit f868e23

Please sign in to comment.