Skip to content

Commit

Permalink
fix(android): rework the splashscreen implementation (#377)
Browse files Browse the repository at this point in the history
Co-authored-by: jeremydolle <j.dolle@thecodingmachine.com>
  • Loading branch information
JeremyDolle and JeremyDolle committed Aug 25, 2023
1 parent 6590b8a commit 380a342
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 32 deletions.
24 changes: 7 additions & 17 deletions template/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,17 @@
android:theme="@style/AppTheme"
>
<activity
android:name=".SplashActivity"
android:theme="@style/SplashTheme"
android:label="@string/app_name"
android:exported="true"
>
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:theme="@style/SplashTheme"
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>

<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" />
</intent-filter>
</activity>
</application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.defaults.DefaultReactActivityDelegate;
import android.os.Bundle;

public class MainActivity extends ReactActivity {

Expand All @@ -29,4 +30,10 @@ protected ReactActivityDelegate createReactActivityDelegate() {
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
DefaultNewArchitectureEntryPoint.getFabricEnabled());
}

@Override
protected void onCreate(Bundle savedInstance) {
super.onCreate(savedInstance);
setTheme(R.style.AppTheme);
}
}

This file was deleted.

Binary file modified template/android/app/src/main/res/drawable/splash_icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 380a342

Please sign in to comment.