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,27 +1,27 @@
<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
android:name=".MainApplication"
<application android:label="@string/app_name"
android:name=".MainApplication" android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="${usesCleartextTraffic}"
android:supportsRtl="true">
<activity
android:name=".MainActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:icon="@mipmap/ic_launcher" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:roundIcon="@mipmap/ic_launcher_round" android:launchMode="singleTask"
android:allowBackup="false" android:windowSoftInputMode="adjustResize"
android:theme="@style/AppTheme" android:exported="true"
android:usesCleartextTraffic="${usesCleartextTraffic}" android:theme="@style/BootTheme">
android:supportsRtl="true"> <intent-filter>
<activity <action android:name="android.intent.action.MAIN" />
android:name=".MainActivity" <category android:name="android.intent.category.LAUNCHER" />
android:label="@string/app_name" </intent-filter>
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" </activity>
android:launchMode="singleTask" </application>
android:windowSoftInputMode="adjustResize"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest> </manifest>

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