Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Color of Splash Screen Spinner in cordova-plugin-splashscreen

I'm about to finish my first App with Ionic/Cordova.

YES it's GREAT, but sometimes I wonder why things are so complicated (with all those plugins and stuff :) )

I wonder if I can change the color of my Splash-Screen-Spinner.

Any Ideas? I search in die Source-Code: Color, Spinner....., but i didn't find a hint.

I think this would help so many people.

Greetings

like image 457
Flosut Mözil Avatar asked Mar 11 '16 15:03

Flosut Mözil


1 Answers

At least with Cordova 7.0 and Cordova iOS 4.4.0, there's no need to change the splash screen plugin's source code. You can just add the following line to your config.xml file and the spinner will appear as white instead of grey.

<preference name="TopActivityIndicator" value="whiteLarge" />

NOTE: The Apache Cordova documentation is a bit confusing when it comes to the spinner. The config.xml guide says the following about TopActivityIndicator:

Controls the appearance of the small spinning icon in the status bar that indicates significant processor activity.

I believe that statement refers to the following spinner:

enter image description here

However, at least on iOS as of Cordova 7.0, changing TopActivityIndicator affects the appearance of the spinner that appears in the middle of the screen while the app is opening. Here's an example of the whiteLarge setting:

enter image description here

Hope that helps.

like image 83
sherb Avatar answered Oct 04 '22 08:10

sherb