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,
useSafeAreaInsets,
} from 'react-native-safe-area-context';
import RNBootSplash from 'react-native-bootsplash';
import { useEffect } from 'react';
function App() {
useEffect(() => {
RNBootSplash.hide({ fade: true });
}, []);
const isDarkMode = useColorScheme() === 'dark';
return (

View File

@@ -1,27 +1,27 @@
<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:name=".MainApplication"
android:label="@string/app_name"
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: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:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
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>
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true"
android:theme="@style/BootTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

View File

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

View File

@@ -1,9 +1,12 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
</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>

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"
},
"dependencies": {
"@react-native/new-app-screen": "0.83.1",
"react": "19.2.0",
"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"
},
"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