kitolog / cordova-plugin-animated-splashscreen

Mirror of Apache Cordova Plugin splashscreen
Apache License 2.0
7 stars 4 forks source link

cordova-plugin-animated-splashscreen

Animated Splash Screen Plugin

Based on cordova-custom-config plugin and cordova-plugin-splashscreen

  1. Animation based on changing images one-by-one. Created animation slides and place to the resourses directory
  2. Update config.xml file (listed below)
  3. API is the same as in cordova-plugin-splashscreen

Installation

// npm hosted (new) id cordova plugin add cordova-plugin-animated-splashscreen

// you may also install directly from this repo cordova plugin add https://github.com/kitolog/cordova-plugin-animated-splashscreen

Setup:

Add to config.xml:

Common:

Duration in seconds

<preference name="AnimatedSplashScreenAnimationDuration" value="5" />

Disable original splashscreen plugin, it's not needed

<preference name="SplashScreen" value="none" />

Repeat count

0 - no repeat

<preference name="AnimatedSplashScreenAnimationRepeatCount" value="0" />

iOS

IOS Images Order:

<preference name="AnimatedSplashScreenIosImages" value="animated-1.png,animated-2.png,animated-3.png,animated-4.png,animated-5.png" />

...

IOS Images paths:

<platform name="ios">

...

<custom-resource catalog="animated-1" idiom="universal" scale="1x" src="https://github.com/kitolog/cordova-plugin-animated-splashscreen/raw/master/resources/ios/splash/animated-1.png" type="image" />

<custom-resource catalog="animated-2" idiom="universal" scale="1x" src="https://github.com/kitolog/cordova-plugin-animated-splashscreen/raw/master/resources/ios/splash/animated-2.png" type="image" />

...</platform> `

Android

Android Images Order:

<preference name="AnimatedSplashScreenAndroidImages" value="animated1,animated2,animated3,animated4,animated5" />

...

Android Images paths:

<platform name="android">

...

<resource-file src="https://github.com/kitolog/cordova-plugin-animated-splashscreen/raw/master/resources/android/splash/animated-1.png" target="app/src/main/res/drawable-port-xxxhdpi/animated1.png" /> <resource-file src="https://github.com/kitolog/cordova-plugin-animated-splashscreen/raw/master/resources/android/splash/animated-2.png" target="app/src/main/res/drawable-port-xxxhdpi/animated2.png" />

...</platform>

NOTE: Android screen sizes:

(in example code, image has 1920 x 1280 px size, so it should be placed to drawable-port-xxxhdpi)

LDPI:

MDPI:

HDPI:

XHDPI:

XXHDPI:

XXXHDPI:

What's new

Appelian, 2015