diff --git a/LeonidsLib/src/main/java/com/plattysoft/leonids/ParticleSystem.java b/LeonidsLib/src/main/java/com/plattysoft/leonids/ParticleSystem.java index 0e15b8d..c5b8f80 100644 --- a/LeonidsLib/src/main/java/com/plattysoft/leonids/ParticleSystem.java +++ b/LeonidsLib/src/main/java/com/plattysoft/leonids/ParticleSystem.java @@ -219,6 +219,37 @@ public ParticleSystem(Activity a, int maxParticles, Bitmap bitmap, long timeToLi } } + /** + * Utility constructor that receives an array of Bitmaps + * + * @param a The parent activity + * @param maxParticles The maximum number of particles + * @param bitmaps An array of bitmaps which will be randomly assigned to particles + * @param timeToLive The time to live for the particles + * @param parentViewId The view Id for the parent of the particle system + */ + public ParticleSystem(Activity a, int maxParticles, Bitmap[] bitmaps, long timeToLive, int parentViewId) { + this((ViewGroup) a.findViewById(parentViewId), maxParticles, timeToLive); + for (int i=0; i