Commit dc3f00b1 authored by Muhammad Ameen's avatar Muhammad Ameen 💻

splash screen complete

parent b7cf4800
......@@ -6,9 +6,12 @@ import Routes from './src/Routes/Routes';
import SplashScreen from 'react-native-splash-screen';
const App = () => {
useEffect(() => {
SplashScreen.hide();
}, []);
useEffect(() => {
// setTimeout(() => {
// }, 2000);
SplashScreen.hide();
// SplashScreen.hide();
}, []);
return (
<Provider store={store}>
<Routes />
......
......@@ -10,6 +10,20 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">
<!-- <activity
android:name=".SplashActivity"
android:theme="@style/SplashTheme"
android:label="@string/app_name"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity> -->
<activity
android:name=".MainActivity"
android:label="@string/app_name"
......
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/blue" />
<item android:width="200dp" android:height="200dp" android:drawable="@drawable/baitussalam" android:gravity="center" />
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- <ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/launch_screen" android:scaleType="centerCrop" /> -->
android:layout_height="match_parent"
android:background="@color/blue"
android:gravity="center">
<ImageView android:layout_width="200dp" android:layout_height="200dp" android:layout_marginTop="24dp" android:src="@drawable/baitussalam" android:scaleType="centerCrop" />
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="primary_dark">#000000</color>
<color name="status_bar_color">#000000</color>
<color name="blue">#ffffff</color>
<color name="primary_dark">#ffffff</color>
<!-- <color name="status_bar_color">#ffffff</color> -->
</resources>
\ No newline at end of file
......@@ -6,6 +6,11 @@
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
</style>
<style name="SplashScreenTheme" parent="SplashScreen_SplashTheme">
<item name="colorPrimaryDark">@color/status_bar_color</item>
<!-- <item name="colorPrimaryDark">@color/status_bar_color</item> -->
</style>
<style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowBackground">@drawable/background_splash</item>
<item name="android:statusBarColor">@color/blue</item>
</style>
</resources>
React Native Splash Screen Youtube Video
https://www.youtube.com/watch?v=yFrx8HZlNtI
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment