You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2017/10/18 21:22:41 UTC

[1/3] cordova-plugin-splashscreen git commit: Tabs to spaces

Repository: cordova-plugin-splashscreen
Updated Branches:
  refs/heads/master 0b75c1faa -> 7cb318727


Tabs to spaces


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/c2c3a980
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/c2c3a980
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/c2c3a980

Branch: refs/heads/master
Commit: c2c3a980e14614bea2c18f144bd5873ca54c73ec
Parents: 1a4b51f
Author: MartijnW49 <wi...@gmail.com>
Authored: Fri Sep 22 18:20:53 2017 +0200
Committer: Steve Gill <st...@gmail.com>
Committed: Wed Oct 18 14:21:51 2017 -0700

----------------------------------------------------------------------
 src/android/SplashScreen.java | 42 +++++++++++++++++++-------------------
 1 file changed, 21 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/c2c3a980/src/android/SplashScreen.java
----------------------------------------------------------------------
diff --git a/src/android/SplashScreen.java b/src/android/SplashScreen.java
index 37e8caf..6f56c6c 100644
--- a/src/android/SplashScreen.java
+++ b/src/android/SplashScreen.java
@@ -367,27 +367,27 @@ public class SplashScreen extends CordovaPlugin {
                 RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
                 layoutParams.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE);
                 progressBar.setLayoutParams(layoutParams);
-				
-				if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
-					String colorName = preferences.getString("SplashScreenSpinnerColor", null);
-					if(colorName != null){
-						int[][] states = new int[][] {
-							new int[] { android.R.attr.state_enabled}, // enabled
-							new int[] {-android.R.attr.state_enabled}, // disabled
-							new int[] {-android.R.attr.state_checked}, // unchecked
-							new int[] { android.R.attr.state_pressed}  // pressed
-						};
-						int progressBarColor = Color.parseColor(colorName);
-						int[] colors = new int[] {
-							progressBarColor,
-							progressBarColor,
-							progressBarColor,
-							progressBarColor
-						};
-						ColorStateList colorStateList = new ColorStateList(states, colors);             
-						progressBar.setIndeterminateTintList(colorStateList);
-					}
-				}
+
+                if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
+                    String colorName = preferences.getString("SplashScreenSpinnerColor", null);
+                    if(colorName != null){
+                        int[][] states = new int[][] {
+                            new int[] { android.R.attr.state_enabled}, // enabled
+                            new int[] {-android.R.attr.state_enabled}, // disabled
+                            new int[] {-android.R.attr.state_checked}, // unchecked
+                            new int[] { android.R.attr.state_pressed}  // pressed
+                        };
+                        int progressBarColor = Color.parseColor(colorName);
+                        int[] colors = new int[] {
+                            progressBarColor,
+                            progressBarColor,
+                            progressBarColor,
+                            progressBarColor
+                        };
+                        ColorStateList colorStateList = new ColorStateList(states, colors);
+                        progressBar.setIndeterminateTintList(colorStateList);
+                    }
+                }
 
                 centeredLayout.addView(progressBar);
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[2/3] cordova-plugin-splashscreen git commit: CB-12011: (android) added the possibility to change the spinner color on Android 5.0+ apps

Posted by st...@apache.org.
CB-12011: (android) added the possibility to change the spinner color on Android 5.0+ apps


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/1a4b51fb
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/1a4b51fb
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/1a4b51fb

Branch: refs/heads/master
Commit: 1a4b51fbc8344da00a9e2d4fdf96e6ed8958984a
Parents: 0b75c1f
Author: MartijnW49 <wi...@gmail.com>
Authored: Thu Oct 13 14:20:32 2016 +0200
Committer: Steve Gill <st...@gmail.com>
Committed: Wed Oct 18 14:21:51 2017 -0700

----------------------------------------------------------------------
 src/android/SplashScreen.java | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/1a4b51fb/src/android/SplashScreen.java
----------------------------------------------------------------------
diff --git a/src/android/SplashScreen.java b/src/android/SplashScreen.java
index c2424f6..37e8caf 100644
--- a/src/android/SplashScreen.java
+++ b/src/android/SplashScreen.java
@@ -24,6 +24,7 @@ import android.app.ProgressDialog;
 import android.content.Context;
 import android.content.DialogInterface;
 import android.content.res.Configuration;
+import android.content.res.ColorStateList;
 import android.graphics.Color;
 import android.graphics.drawable.ColorDrawable;
 import android.os.Handler;
@@ -366,6 +367,27 @@ public class SplashScreen extends CordovaPlugin {
                 RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
                 layoutParams.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE);
                 progressBar.setLayoutParams(layoutParams);
+				
+				if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
+					String colorName = preferences.getString("SplashScreenSpinnerColor", null);
+					if(colorName != null){
+						int[][] states = new int[][] {
+							new int[] { android.R.attr.state_enabled}, // enabled
+							new int[] {-android.R.attr.state_enabled}, // disabled
+							new int[] {-android.R.attr.state_checked}, // unchecked
+							new int[] { android.R.attr.state_pressed}  // pressed
+						};
+						int progressBarColor = Color.parseColor(colorName);
+						int[] colors = new int[] {
+							progressBarColor,
+							progressBarColor,
+							progressBarColor,
+							progressBarColor
+						};
+						ColorStateList colorStateList = new ColorStateList(states, colors);             
+						progressBar.setIndeterminateTintList(colorStateList);
+					}
+				}
 
                 centeredLayout.addView(progressBar);
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[3/3] cordova-plugin-splashscreen git commit: Update readme

Posted by st...@apache.org.
Update readme

 This closes #116


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/7cb31872
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/7cb31872
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/7cb31872

Branch: refs/heads/master
Commit: 7cb318727bf68fe957796629484ab7230b5fb74a
Parents: c2c3a98
Author: MartijnW49 <wi...@gmail.com>
Authored: Fri Sep 22 18:23:14 2017 +0200
Committer: Steve Gill <st...@gmail.com>
Committed: Wed Oct 18 14:21:52 2017 -0700

----------------------------------------------------------------------
 README.md | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/7cb31872/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index bcde930..86df319 100644
--- a/README.md
+++ b/README.md
@@ -436,6 +436,7 @@ In your `config.xml`, you can add the following preferences:
 ```xml
 <preference name="SplashMaintainAspectRatio" value="true|false" />
 <preference name="SplashShowOnlyFirstTime" value="true|false" />
+<preference name="SplashScreenSpinnerColor" value="white" />
 ```
 
 "SplashMaintainAspectRatio" preference is optional. If set to true, splash screen drawable is not stretched to fit screen, but instead simply "covers" the screen, like CSS "background-size:cover". This is very useful when splash screen images cannot be distorted in any way, for example when they contain scenery or text. This setting works best with images that have large margins (safe areas) that can be safely cropped on screens with different aspect ratios.
@@ -444,6 +445,8 @@ The plugin reloads splash drawable whenever orientation changes, so you can spec
 
 "SplashShowOnlyFirstTime" preference is also optional and defaults to `true`. When set to `true` splash screen will only appear on application launch. However, if you plan to use `navigator.app.exitApp()` to close application and force splash screen appear on next launch, you should set this property to `false` (this also applies to closing the App with Back button).
 
+"SplashScreenSpinnerColor" preference is also optional and is ignored when not set. Setting it to a valid color name or HEX color code will change the color of the spinner on Android 5.0+ devices.
+
 ### Browser Quirks
 
 You can use the following preferences in your `config.xml`:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org