Implemet splash screen

This commit is contained in:
mansi-dev
2026-02-09 23:57:51 +05:30
parent c14f8eb96a
commit 18fe05a718
8 changed files with 7016 additions and 27 deletions

View File

@@ -11,8 +11,14 @@ import {
SafeAreaProvider, SafeAreaProvider,
useSafeAreaInsets, useSafeAreaInsets,
} from 'react-native-safe-area-context'; } from 'react-native-safe-area-context';
import RNBootSplash from 'react-native-bootsplash';
import { useEffect } from 'react';
function App() { function App() {
useEffect(() => {
RNBootSplash.hide({ fade: true });
}, []);
const isDarkMode = useColorScheme() === 'dark'; const isDarkMode = useColorScheme() === 'dark';
return ( return (

View File

@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> <manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<application <application
@@ -17,7 +16,8 @@
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask" android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize" android:windowSoftInputMode="adjustResize"
android:exported="true"> android:exported="true"
android:theme="@style/BootTheme">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />

View File

@@ -0,0 +1,3 @@
<resources>
<color name="bootsplash_background">#ffffff</color>
</resources>

View File

@@ -1,9 +1,12 @@
<resources> <resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar"> <style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. --> <!-- Customize your theme here. -->
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item> <item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
</style> </style>
<style name="BootTheme" parent="Theme.BootSplash">
<item name="bootSplashBackground">@color/bootsplash_background</item>
<item name="bootSplashLogo">@drawable/bootsplash_logo</item>
<item name="postBootSplashTheme">@style/AppTheme</item>
</style>
</resources> </resources>

BIN
logo-removebg-preview.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

View File

@@ -10,9 +10,10 @@
"test": "jest" "test": "jest"
}, },
"dependencies": { "dependencies": {
"@react-native/new-app-screen": "0.83.1",
"react": "19.2.0", "react": "19.2.0",
"react-native": "0.83.1", "react-native": "0.83.1",
"@react-native/new-app-screen": "0.83.1", "react-native-bootsplash": "^7.0.2",
"react-native-safe-area-context": "^5.5.2" "react-native-safe-area-context": "^5.5.2"
}, },
"devDependencies": { "devDependencies": {

BIN
splash.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

6976
yarn.lock Normal file

File diff suppressed because it is too large Load Diff