diff --git a/android/capacitor/src/main/java/com/getcapacitor/Splash.java b/android/capacitor/src/main/java/com/getcapacitor/Splash.java index 480638b738..7f533ea34b 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/Splash.java +++ b/android/capacitor/src/main/java/com/getcapacitor/Splash.java @@ -9,6 +9,7 @@ import android.graphics.PixelFormat; import android.graphics.drawable.Animatable; import android.graphics.drawable.Drawable; +import android.graphics.drawable.LayerDrawable; import android.os.Handler; import android.view.Gravity; import android.view.View; @@ -60,6 +61,18 @@ private static void buildViews(Context c, CapConfig config) { ((Animatable) splash).start(); } + if(splash instanceof LayerDrawable){ + LayerDrawable layeredSplash = (LayerDrawable) splash; + + for(int i = 0; i < layeredSplash.getNumberOfLayers(); i++){ + Drawable layerDrawable = layeredSplash.getDrawable(i); + + if(layerDrawable instanceof Animatable) { + ((Animatable) layerDrawable).start(); + } + } + } + splashImage = new ImageView(c); splashImage.setFitsSystemWindows(true);