Skip to content

Commit

Permalink
splash_Screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Saboten758 committed Aug 27, 2023
1 parent 9b61579 commit a3f9c4a
Show file tree
Hide file tree
Showing 17 changed files with 388 additions and 11 deletions.
14 changes: 13 additions & 1 deletion App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
import React from "react";
import React, { useEffect } from "react";
import Root from "./Navigators/Root";
import BootSplash from "react-native-bootsplash";
import { ToastAndroid } from "react-native";
const App=()=>{
useEffect(() => {
const init = async () => {
// …do multiple sync or async tasks
};

init().finally(async () => {
await BootSplash.hide({ fade: true });
ToastAndroid.show("Welcome to Lemon Player",ToastAndroid.SHORT)
});
}, []);
return<Root/>
}
export default App
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:usesCleartextTraffic="true"
android:theme="@style/AppTheme">
android:theme="@style/BootTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
Expand Down
9 changes: 7 additions & 2 deletions android/app/src/main/java/com/lemon_player/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.lemon_player;

import android.os.Bundle;
import com.zoontek.rnbootsplash.RNBootSplash;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
Expand All @@ -15,7 +16,11 @@ public class MainActivity extends ReactActivity {
protected String getMainComponentName() {
return "Lemon_Player";
}

@Override
protected void onCreate(Bundle savedInstanceState) {
RNBootSplash.init(this, R.style.BootTheme); // ⬅️ initialize the splash screen
super.onCreate(savedInstanceState); // or super.onCreate(null) with react-native-screens
}
/**
* Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
* DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
Expand Down
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.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 android/app/src/main/res/mipmap-hdpi/ic_launcher_round.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 android/app/src/main/res/mipmap-mdpi/ic_launcher.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 android/app/src/main/res/mipmap-mdpi/ic_launcher_round.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 android/app/src/main/res/mipmap-xhdpi/ic_launcher.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 android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.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 android/app/src/main/res/mipmap-xxhdpi/ic_launcher.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 android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.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 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.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 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.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 added android/app/src/main/res/raw/brand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,14 @@
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
</style>


<style name="BootTheme" parent="Theme.BootSplash">

<item name="bootSplashLogo">@raw/back</item>
<item name="postBootSplashTheme">@style/AppTheme</item>
<item name="bootSplashBrand">@raw/brand</item>
<item name="bootSplashBackground">@color/black</item>
</style>


</resources>
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"axios": "^1.4.0",
"react": "18.2.0",
"react-native": "0.72.4",
"react-native-bootsplash": "^5.0.2",
"react-native-element-dropdown": "^2.10.0",
"react-native-pager-view": "^6.2.0",
"react-native-paper": "^5.10.1",
Expand Down
363 changes: 356 additions & 7 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit a3f9c4a

Please sign in to comment.