Skip to content

Commit a61ef21

Browse files
committed
publish v1.0.8
1 parent ebdaff0 commit a61ef21

File tree

6 files changed

+21
-3
lines changed

6 files changed

+21
-3
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
build/
2+
gradle/
3+
gradlew
4+
gradlew.bat
5+
local.properties
26
# Logs
37
logs
48
*.log

android/.npmignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
/build
2+
gradle/
3+
gradlew
4+
gradlew.bat
5+
local.properties

android/src/main/java/com/cboy/rn/splashscreen/SplashScreen.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ public class SplashScreen {
1616
/**
1717
* 打开启动屏
1818
*/
19-
public static void show(final Activity activity) {
19+
public static void show(final Activity activity,boolean fullScreen) {
2020
if (activity == null) return;
2121
mActivity = new WeakReference<Activity>(activity);
2222
activity.runOnUiThread(new Runnable() {
2323
@Override
2424
public void run() {
2525
if (!activity.isFinishing()) {
26-
mSplashDialog = new Dialog(activity, R.style.SplashScreen_SplashTheme);
26+
27+
mSplashDialog = new Dialog(activity,fullScreen? R.style.SplashScreen_Fullscreen:R.style.SplashScreen_SplashTheme);
2728
mSplashDialog.setContentView(R.layout.launch_screen);
2829
mSplashDialog.setCancelable(false);
2930

@@ -34,6 +35,12 @@ public void run() {
3435
}
3536
});
3637
}
38+
/**
39+
* 打开启动屏
40+
*/
41+
public static void show(final Activity activity) {
42+
show(activity,false);
43+
}
3744

3845
/**
3946
* 关闭启动屏

android/src/main/res/values/styles.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@
66
<style name="SplashScreen_SplashTheme" parent="Theme.AppCompat.NoActionBar">
77
<item name="android:windowAnimationStyle">@style/SplashScreen_SplashAnimation</item>
88
</style>
9+
<style name="SplashScreen_Fullscreen" parent="SplashScreen_SplashTheme">
10+
<item name="android:windowFullscreen">true</item>
11+
</style>
912
</resources>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-splash-screen",
3-
"version": "1.0.7",
3+
"version": "1.0.8",
44
"description": "A splash screen for react-native, hide when application loaded ,it works on iOS and Android.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)