Skip to content

Commit

Permalink
feat: splash screen and icons
Browse files Browse the repository at this point in the history
  • Loading branch information
obeim committed Jan 26, 2024
1 parent 73ef825 commit 602664b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
12 changes: 5 additions & 7 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"expo": {
"name": "quran-app",
"name": "Quran",
"slug": "quran-app",
"version": "1.0.0",
"orientation": "portrait",
Expand All @@ -12,9 +12,7 @@
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"assetBundlePatterns": [
"**/*"
],
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
},
Expand All @@ -23,19 +21,19 @@
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"jsEngine": "hermes",
"package": "com.obei.quranapp"
},
"web": {
"bundler": "metro",
"output": "static",
"favicon": "./assets/images/favicon.png"
},
"plugins": [
"expo-router"
],
"plugins": ["expo-router"],
"experiments": {
"typedRoutes": true
},
"jsEngine": "hermes",
"extra": {
"router": {
"origin": false
Expand Down
9 changes: 4 additions & 5 deletions app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { SafeAreaView, StatusBar, StyleSheet, I18nManager } from "react-native";
import { useFonts } from "expo-font";
import { openDatabase } from "@/db/utils";
import mydb from "@/assets/quran.db";

SplashScreen.preventAutoHideAsync();

export default function RootLayout(): ReactNode {
Expand All @@ -13,15 +14,13 @@ export default function RootLayout(): ReactNode {
"HelveticaNeueLTArabic-Light": require("../assets/fonts/HelveticaNeueLTArabic-Light.ttf"),
HafsSmart: require("../assets/fonts/HafsSmart_08.ttf"),
});

I18nManager.allowRTL(true);
I18nManager.forceRTL(true);

const onLayoutRootView = useCallback(async () => {
openDatabase(mydb).then(async () => {
if (fontsLoaded || fontError) {
await SplashScreen.hideAsync();
}
});
await SplashScreen.hideAsync();
openDatabase(mydb);
}, [fontsLoaded, fontError]);

if (!fontsLoaded && !fontError) {
Expand Down
Binary file modified assets/images/adaptive-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 602664b

Please sign in to comment.