Skip to content

Commit 19abb70

Browse files
feat: add splashscreen and application icons (#7)
* perf: configurando gitignore message: adicionado pasta android e arquivos gerados ao rodar projeto * feat: adicionando biblioteca de fontes lato message: foi adiconado fonte lato e configurado nos temas da aplicacao para fazer os testes tambem foi configurado o package json para rodar o comando start * feat: add splashscreen and application icons This commit will add the icons to be shown on the Android and IOS screens on the user's device and will also add the splash to be shown when the application loads
1 parent 2923b80 commit 19abb70

File tree

10 files changed

+654
-37
lines changed

10 files changed

+654
-37
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,14 @@ web-build/
1515

1616
coverage/
1717

18+
# Pasta Android do React Native
19+
android/
1820

21+
# Arquivos gerados pelo Android Studio
22+
*.iml
23+
*.gradle
24+
*.keystore
25+
build/
26+
27+
yarn.lock
1928

app.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
"splash": {
1010
"image": "./assets/splash.png",
1111
"resizeMode": "contain",
12-
"backgroundColor": "#ffffff"
12+
"backgroundColor": "#4B00FA"
1313
},
14-
"assetBundlePatterns": ["**/*"],
14+
"assetBundlePatterns": [
15+
"**/*"
16+
],
1517
"ios": {
1618
"supportsTablet": true,
1719
"googleServicesFile": "./google-services.json",
@@ -20,7 +22,7 @@
2022
"android": {
2123
"adaptiveIcon": {
2224
"foregroundImage": "./assets/adaptive-icon.png",
23-
"backgroundColor": "#ffffff"
25+
"backgroundColor": "#4B00FA"
2426
},
2527
"googleServicesFile": "./google-services.json",
2628
"package": "com.econominhas.app"
@@ -35,9 +37,11 @@
3537
}
3638
},
3739
"owner": "econominhas",
38-
"plugins": ["@react-native-google-signin/google-signin"],
40+
"plugins": [
41+
"@react-native-google-signin/google-signin"
42+
],
3943
"updates": {
4044
"url": "https://u.expo.dev/ca980805-e57a-46b9-99c0-71417e7701e4"
4145
}
4246
}
43-
}
47+
}

assets/adaptive-icon.png

1.09 KB
Loading

assets/favicon.png

-429 Bytes
Loading

assets/icon.png

2.07 KB
Loading

assets/splash.png

-20.6 KB
Loading

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,23 @@
44
"main": "node_modules/expo/AppEntry.js",
55
"scripts": {
66
"start": "expo start",
7-
"android": "expo start --android",
8-
"ios": "expo start --ios",
7+
"android": "expo run:android",
8+
"ios": "expo run:ios",
99
"web": "expo start --web",
1010
"lint": "eslint .",
1111
"test": "jest",
1212
"prepare": "husky install"
1313
},
1414
"dependencies": {
15+
"@expo-google-fonts/lato": "^0.2.3",
1516
"@react-native-google-signin/google-signin": "^10.1.1",
1617
"@react-navigation/native": "^6.1.9",
1718
"@react-navigation/native-stack": "^6.9.17",
1819
"axios": "^1.6.2",
1920
"expo": "~49.0.15",
2021
"expo-dev-client": "~2.4.12",
2122
"expo-font": "~11.4.0",
23+
"expo-splash-screen": "~0.20.5",
2224
"expo-status-bar": "~1.6.0",
2325
"expo-updates": "~0.18.17",
2426
"jest": "^29.2.1",

src/contexts/customTheme.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,16 @@ export const ThemeContext = createContext({} as ThemeContextProps);
1919

2020
const fonts = {
2121
family: {
22-
extraBold: 'NunitoSansExtraBold',
23-
bold: 'NunitoSansBold',
24-
regular: 'NunitoSansRegular',
25-
light: 'NunitoSansLight',
26-
medium: 'NunitoSansMedium',
22+
extraBold: 'Lato_900Black',
23+
extraBoldItalic: 'Lato_900Black_Italic',
24+
bold: 'Lato_700Bold',
25+
boldItalic: 'Lato_700Bold_Italic',
26+
regular: 'Lato_400Regular',
27+
regularItalic: 'Lato_400Regular_Italic',
28+
light: 'Lato_300Light',
29+
lightItalic: 'Lato_300Light_Italic',
30+
medium: 'Lato_100Thin',
31+
mediumItalic: 'Lato_100Thin_Italic',
2732
},
2833
sizes: {
2934
title: 32,

src/index.tsx

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
import React from 'react';
22

3+
import {
4+
useFonts,
5+
Lato_100Thin,
6+
Lato_100Thin_Italic,
7+
Lato_300Light,
8+
Lato_300Light_Italic,
9+
Lato_400Regular,
10+
Lato_400Regular_Italic,
11+
Lato_700Bold,
12+
Lato_700Bold_Italic,
13+
Lato_900Black,
14+
Lato_900Black_Italic,
15+
} from '@expo-google-fonts/lato';
316
import { NavigationContainer } from '@react-navigation/native';
4-
import { useFonts } from 'expo-font';
517
import { StatusBar } from 'expo-status-bar';
618
import { SafeAreaView } from 'react-native-safe-area-context';
719
import { ThemeProvider } from 'styled-components';
@@ -13,11 +25,16 @@ import { MainNavigator } from './navigation';
1325
function App() {
1426
const { palette, darkMode } = useCustomTheme();
1527
const [fontsLoaded] = useFonts({
16-
NunitoSansLight: require('../assets/fonts/NunitoSansLight.ttf'),
17-
NunitoSansBold: require('../assets/fonts/NunitoSansBold.ttf'),
18-
NunitoSansExtraBold: require('../assets/fonts/NunitoSansExtraBold.ttf'),
19-
NunitoSansMedium: require('../assets/fonts/NunitoSansMedium.ttf'),
20-
NunitoSansRegular: require('../assets/fonts/NunitoSansRegular.ttf'),
28+
Lato_100Thin,
29+
Lato_100Thin_Italic,
30+
Lato_300Light,
31+
Lato_300Light_Italic,
32+
Lato_400Regular,
33+
Lato_400Regular_Italic,
34+
Lato_700Bold,
35+
Lato_700Bold_Italic,
36+
Lato_900Black,
37+
Lato_900Black_Italic,
2138
});
2239

2340
if (!fontsLoaded) {

0 commit comments

Comments
 (0)