Skip to content

v1.2.0

Compare
Choose a tag to compare
@DanielMartinus DanielMartinus released this 07 Mar 16:39

Added

Changes

Minor API change, old ones still work due to backwards compatibility.

Before Becomes
Shape.RECT Shape.Square
Shape.CIRCLE Shape.Circle

Add a custom drawable like this:

val drawable = ContextCompat.getDrawable(context, R.drawable.star)
val star = Shape.DrawableShape(drawable)

viewKonfetti.build()
             ...
            .addShapes(star)
            .streamFor(300, 5000L)

If you want to keep the original colours of the drawable set tinting to false. This is by default set to true.

val drawable = ContextCompat.getDrawable(context, R.drawable.gradientDrawable)
Shape.DrawableShape(drawable, false)