Skip to content

Commit

Permalink
fixed bootsplash error on android, .env ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcastro committed Dec 11, 2019
1 parent ba29fd5 commit 941d221
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-template-rokket",
"version": "0.1.1",
"version": "0.1.2",
"description": "React Native template for new Rokket Labs projects",
"files": [
"template",
Expand Down
2 changes: 2 additions & 0 deletions template/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.env

# OSX
#
.DS_Store
Expand Down
6 changes: 4 additions & 2 deletions template/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">

<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize"
android:exported="true">
</activity>
android:exported="true" />

<activity
android:name="com.zoontek.rnbootsplash.RNBootSplashActivity"
android:theme="@style/BootTheme">
Expand All @@ -25,6 +26,7 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.helloworld;

import android.os.Bundle;

import com.facebook.react.ReactActivity;
import com.zoontek.rnbootsplash.RNBootSplash;

public class MainActivity extends ReactActivity {

Expand All @@ -12,4 +15,10 @@ public class MainActivity extends ReactActivity {
protected String getMainComponentName() {
return "HelloWorld";
}

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
RNBootSplash.show(R.drawable.bootsplash, MainActivity.this);
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
package com.helloworld;

import android.os.Bundle;

import com.facebook.react.ReactActivity;
import com.zoontek.rnbootsplash.RNBootSplash;

import android.app.Application;
import android.content.Context;
import com.facebook.react.PackageList;
Expand Down Expand Up @@ -49,7 +44,6 @@ public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
initializeFlipper(this); // Remove this line if you don't want Flipper enabled
RNBootSplash.show(R.drawable.bootsplash, MainActivity.this);
}

/**
Expand Down

0 comments on commit 941d221

Please sign in to comment.