Skip to content

Commit f6a9aca

Browse files
committed
fix #57
1 parent 78f7995 commit f6a9aca

25 files changed

+305
-56
lines changed

examples/android/app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ android {
133133
}
134134

135135
dependencies {
136+
compile project(':react-native-splash-screen')
136137
compile fileTree(dir: "libs", include: ["*.jar"])
137138
compile "com.android.support:appcompat-v7:23.0.1"
138139
compile "com.facebook.react:react-native:+" // From node_modules

examples/android/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.examples"
2+
package="org.examples"
33
android:versionCode="1"
44
android:versionName="1.0">
55

@@ -11,13 +11,13 @@
1111
android:targetSdkVersion="22" />
1212

1313
<application
14-
android:name=".MainApplication"
14+
android:name="org.examples.MainApplication"
1515
android:allowBackup="true"
1616
android:label="@string/app_name"
1717
android:icon="@mipmap/ic_launcher"
1818
android:theme="@style/AppTheme">
1919
<activity
20-
android:name=".MainActivity"
20+
android:name="org.examples.MainActivity"
2121
android:label="@string/app_name"
2222
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
2323
android:windowSoftInputMode="adjustResize">

examples/android/app/src/main/java/com/examples/MainActivity.java renamed to examples/android/app/src/main/java/org/examples/MainActivity.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
package com.examples;
1+
package org.examples;
22

3+
import android.os.Bundle;
4+
5+
import org.devio.rn.splashscreen.SplashScreen;
36
import com.facebook.react.ReactActivity;
47

58
public class MainActivity extends ReactActivity {
@@ -12,4 +15,10 @@ public class MainActivity extends ReactActivity {
1215
protected String getMainComponentName() {
1316
return "examples";
1417
}
18+
19+
@Override
20+
protected void onCreate(Bundle savedInstanceState) {
21+
SplashScreen.show(this); // here
22+
super.onCreate(savedInstanceState);
23+
}
1524
}

examples/android/app/src/main/java/com/examples/MainApplication.java renamed to examples/android/app/src/main/java/org/examples/MainApplication.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
package com.examples;
1+
package org.examples;
22

33
import android.app.Application;
44

55
import com.facebook.react.ReactApplication;
6+
import org.devio.rn.splashscreen.SplashScreenReactPackage;
67
import com.facebook.react.ReactNativeHost;
78
import com.facebook.react.ReactPackage;
89
import com.facebook.react.shell.MainReactPackage;
@@ -22,7 +23,8 @@ public boolean getUseDeveloperSupport() {
2223
@Override
2324
protected List<ReactPackage> getPackages() {
2425
return Arrays.<ReactPackage>asList(
25-
new MainReactPackage()
26+
new MainReactPackage(),
27+
new SplashScreenReactPackage()
2628
);
2729
}
2830
};
4 KB
Binary file not shown.
4 KB
Binary file not shown.
4 KB
Binary file not shown.
57 KB
Loading
98.5 KB
Loading
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:orientation="vertical" android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:background="@drawable/launch_screen">
6+
7+
</LinearLayout>

0 commit comments

Comments
 (0)