Skip to content

Commit 7c4c7ab

Browse files
committed
双端splash screen/
1 parent 87d1659 commit 7c4c7ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+150
-284
lines changed

android/app/build.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,21 @@ android {
103103
minSdkVersion 16
104104
targetSdkVersion 22
105105
versionCode 1
106-
versionName "1.0"
106+
versionName "1.0.0"
107107
ndk {
108108
abiFilters "armeabi-v7a", "x86"
109109
}
110110
renderscriptTargetApi 19
111111
renderscriptSupportModeEnabled true
112112
}
113+
signingConfigs {
114+
release {
115+
storeFile file(MYAPP_RELEASE_STORE_FILE)
116+
storePassword MYAPP_RELEASE_STORE_PASSWORD
117+
keyAlias MYAPP_RELEASE_KEY_ALIAS
118+
keyPassword MYAPP_RELEASE_KEY_PASSWORD
119+
}
120+
}
113121
splits {
114122
abi {
115123
reset()
@@ -122,6 +130,7 @@ android {
122130
release {
123131
minifyEnabled enableProguardInReleaseBuilds
124132
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
133+
signingConfig signingConfigs.release
125134
}
126135
}
127136
// applicationVariants are e.g. debug, release
@@ -140,6 +149,7 @@ android {
140149
}
141150

142151
dependencies {
152+
compile project(':react-native-splash-screen')
143153
compile project(':react-native-blur')
144154
compile project(':react-native-linear-gradient')
145155
compile project(':react-native-code-push')

android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.awesomeproject"
33
android:versionCode="1"
4-
android:versionName="1.0">
4+
android:versionName="1.0.0">
55

66
<uses-permission android:name="android.permission.INTERNET" />
77
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

android/app/src/main/java/com/awesomeproject/MainActivity.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package com.awesomeproject;
22

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

58
public class MainActivity extends ReactActivity {
69

@@ -9,6 +12,11 @@ public class MainActivity extends ReactActivity {
912
* This is used to schedule rendering of the component.
1013
*/
1114
@Override
15+
protected void onCreate(Bundle savedInstanceState) {
16+
SplashScreen.show(this, true);
17+
super.onCreate(savedInstanceState);
18+
}
19+
@Override
1220
protected String getMainComponentName() {
1321
return "AwesomeProject";
1422
}

android/app/src/main/java/com/awesomeproject/MainApplication.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.app.Application;
44

55
import com.facebook.react.ReactApplication;
6+
import org.devio.rn.splashscreen.SplashScreenReactPackage;
67
import com.cmcewen.blurview.BlurViewPackage;
78
import com.BV.LinearGradient.LinearGradientPackage;
89
import com.microsoft.codepush.react.CodePush;
@@ -33,6 +34,7 @@ public boolean getUseDeveloperSupport() {
3334
protected List<ReactPackage> getPackages() {
3435
return Arrays.<ReactPackage>asList(
3536
new MainReactPackage(),
37+
new SplashScreenReactPackage(),
3638
new BlurViewPackage(),
3739
new LinearGradientPackage(),
3840
new CodePush("FblmCRWTrhBTK4pHOxDzOfdqQvs04ksvOXqog", getApplicationContext(), BuildConfig.DEBUG, "http://180.76.138.89:3000"),

android/app/src/main/java/com/awesomeproject/ToastModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public ToastModule(ReactApplicationContext reactContext) {
2222

2323
@Override
2424
public String getName() {
25-
return "ToastRoot";//我已经改了
25+
return "ToastRoot";
2626
}
2727

2828
@Override
216 KB
Loading
216 KB
Loading
216 KB
Loading
216 KB
Loading

0 commit comments

Comments
 (0)