Skip to content

Commit

Permalink
[native] Configure expo-splash-screen for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashoat committed Jun 5, 2020
1 parent e4d0c1e commit bcd544f
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 140 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.squadcal;

import com.facebook.react.ReactFragmentActivity;
import org.devio.rn.splashscreen.SplashScreen;
import android.os.Bundle;
import android.content.Intent;
import android.content.res.Configuration;
Expand All @@ -10,6 +9,9 @@
import com.facebook.react.ReactRootView;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;

import expo.modules.splashscreen.SplashScreen;
import expo.modules.splashscreen.SplashScreenImageResizeMode;

public class MainActivity extends ReactFragmentActivity {

/**
Expand All @@ -23,8 +25,8 @@ protected String getMainComponentName() {

@Override
protected void onCreate(Bundle savedInstanceState) {
SplashScreen.show(this);
super.onCreate(null);
super.onCreate(savedInstanceState);
SplashScreen.show(this, SplashScreenImageResizeMode.NATIVE, ReactRootView.class);
}

@Override
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

24 changes: 0 additions & 24 deletions native/android/app/src/main/res/layout-w801dp/launch_screen.xml

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions native/android/app/src/main/res/layout/launch_screen.xml

This file was deleted.

2 changes: 1 addition & 1 deletion native/android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:textColor">#000000</item>
<item name="android:windowNoTitle">true</item>
<item name="android:background">@drawable/splash</item>
<item name="android:background">@drawable/splashscreen_image</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
</style>
</resources>

0 comments on commit bcd544f

Please sign in to comment.