Browse Source

Use react native vector icons instead of expo implementation

Arnaud Vergnet 4 years ago
parent
commit
ca6f66c661

+ 6
- 0
android/app/build.gradle View File

83
 apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
83
 apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
84
 apply from: "../../node_modules/react-native/react.gradle"
84
 apply from: "../../node_modules/react-native/react.gradle"
85
 
85
 
86
+project.ext.vectoricons = [
87
+    iconFontNames: [ 'MaterialCommunityIcons.ttf'] // Name of the font files you want to copy
88
+]
89
+
90
+apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
91
+
86
 /**
92
 /**
87
  * Set this to true to create two separate APKs instead of one:
93
  * Set this to true to create two separate APKs instead of one:
88
  *   - An APK that only works on ARM devices
94
  *   - An APK that only works on ARM devices

+ 4
- 0
ios/Campus/Info.plist View File

71
 	<string>Automatic</string>
71
 	<string>Automatic</string>
72
 	<key>UIViewControllerBasedStatusBarAppearance</key>
72
 	<key>UIViewControllerBasedStatusBarAppearance</key>
73
 	<false/>
73
 	<false/>
74
+	<key>UIAppFonts</key>
75
+    <array>
76
+      <string>MaterialCommunityIcons.ttf</string>
77
+    </array>
74
 </dict>
78
 </dict>
75
 </plist>
79
 </plist>

+ 3
- 0
ios/Podfile View File

50
   pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications.podspec"
50
   pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications.podspec"
51
   pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"
51
   pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"
52
 
52
 
53
+  # Vector Icons
54
+  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
55
+
53
 end
56
 end

+ 1
- 1
package.json View File

18
     ]
18
     ]
19
   },
19
   },
20
   "dependencies": {
20
   "dependencies": {
21
-    "@expo/vector-icons": "^10.0.0",
22
     "@react-native-community/masked-view": "0.1.6",
21
     "@react-native-community/masked-view": "0.1.6",
23
     "@react-navigation/bottom-tabs": "^5.1.1",
22
     "@react-navigation/bottom-tabs": "^5.1.1",
24
     "@react-navigation/drawer": "^5.1.1",
23
     "@react-navigation/drawer": "^5.1.1",
51
     "react-native-screens": "~2.2.0",
50
     "react-native-screens": "~2.2.0",
52
     "react-native-splash-screen": "^3.2.0",
51
     "react-native-splash-screen": "^3.2.0",
53
     "react-native-unimodules": "~0.9.0",
52
     "react-native-unimodules": "~0.9.0",
53
+    "react-native-vector-icons": "^6.6.0",
54
     "react-native-web": "~0.11.7",
54
     "react-native-web": "~0.11.7",
55
     "react-native-webview": "8.1.1",
55
     "react-native-webview": "8.1.1",
56
     "react-navigation-collapsible": "^5.5.0",
56
     "react-navigation-collapsible": "^5.5.0",

+ 1
- 1
src/components/Overrides/CustomHeaderButton.js View File

1
 // @flow
1
 // @flow
2
 
2
 
3
 import * as React from 'react';
3
 import * as React from 'react';
4
-import {MaterialCommunityIcons} from "@expo/vector-icons";
4
+import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
5
 import {HeaderButton, HeaderButtons} from 'react-navigation-header-buttons';
5
 import {HeaderButton, HeaderButtons} from 'react-navigation-header-buttons';
6
 import {withTheme} from "react-native-paper";
6
 import {withTheme} from "react-native-paper";
7
 import * as Touchable from "react-native/Libraries/Components/Touchable/TouchableNativeFeedback.android";
7
 import * as Touchable from "react-native/Libraries/Components/Touchable/TouchableNativeFeedback.android";

+ 1
- 1
src/components/Overrides/CustomIntroSlider.js View File

2
 
2
 
3
 import * as React from 'react';
3
 import * as React from 'react';
4
 import {Image, Platform, StatusBar, StyleSheet, View} from "react-native";
4
 import {Image, Platform, StatusBar, StyleSheet, View} from "react-native";
5
-import {MaterialCommunityIcons} from "@expo/vector-icons";
5
+import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
6
 import {Text} from "react-native-paper";
6
 import {Text} from "react-native-paper";
7
 import i18n from 'i18n-js';
7
 import i18n from 'i18n-js';
8
 import AppIntroSlider from "react-native-app-intro-slider";
8
 import AppIntroSlider from "react-native-app-intro-slider";

+ 1
- 1
src/components/Screens/ErrorView.js View File

3
 import * as React from 'react';
3
 import * as React from 'react';
4
 import {Button, Subheading, withTheme} from 'react-native-paper';
4
 import {Button, Subheading, withTheme} from 'react-native-paper';
5
 import {StyleSheet, View} from "react-native";
5
 import {StyleSheet, View} from "react-native";
6
-import {MaterialCommunityIcons} from "@expo/vector-icons";
6
+import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
7
 import i18n from 'i18n-js';
7
 import i18n from 'i18n-js';
8
 import {ERROR_TYPE} from "../../utils/WebData";
8
 import {ERROR_TYPE} from "../../utils/WebData";
9
 import * as Animatable from 'react-native-animatable';
9
 import * as Animatable from 'react-native-animatable';

+ 1
- 1
src/components/Tabbar/TabIcon.js View File

3
 import * as React from 'react';
3
 import * as React from 'react';
4
 import {View} from "react-native";
4
 import {View} from "react-native";
5
 import {TouchableRipple, withTheme} from 'react-native-paper';
5
 import {TouchableRipple, withTheme} from 'react-native-paper';
6
-import {MaterialCommunityIcons} from "@expo/vector-icons";
6
+import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
7
 import * as Animatable from "react-native-animatable";
7
 import * as Animatable from "react-native-animatable";
8
 
8
 
9
 type Props = {
9
 type Props = {

+ 1
- 1
src/screens/Tetris/TetrisScreen.js View File

3
 import * as React from 'react';
3
 import * as React from 'react';
4
 import {Alert, View} from 'react-native';
4
 import {Alert, View} from 'react-native';
5
 import {IconButton, Text, withTheme} from 'react-native-paper';
5
 import {IconButton, Text, withTheme} from 'react-native-paper';
6
-import {MaterialCommunityIcons} from "@expo/vector-icons";
6
+import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
7
 import GameLogic from "./GameLogic";
7
 import GameLogic from "./GameLogic";
8
 import Grid from "./components/Grid";
8
 import Grid from "./components/Grid";
9
 import Preview from "./components/Preview";
9
 import Preview from "./components/Preview";

Loading…
Cancel
Save