DanielMartinus / Konfetti
- среда, 31 мая 2017 г. в 03:12:35
Kotlin
Celebrate more with this lightweight confetti particle system 🎊
Celebrate more with this lightweight confetti particle system
Download on Google Play:
Or download the APK here
All you need in your layout is the KonfettiView to render the particles on:
<nl.dionsegijn.konfetti.KonfettiView
android:id="@+id/viewKonfetti"
android:layout_width="match_parent"
android:layout_height="match_parent" />
viewKonfetti.build()
.addColors(Color.YELLOW, Color.GREEN, Color.MAGENTA)
.setDirection(0.0, 359.0)
.setSpeed(1f, 5f)
.setFadeOutEnabled(true)
.setTimeToLive(2000L)
.addShapes(Shape.RECT, Shape.CIRCLE)
.addSizes(Size.SMALL)
.setPosition(-50f, viewKonfetti.width + 50f, -50f, -50f)
.stream(300, 5000L)
Just add the following dependency in your app's build.gradle
dependencies {
compile 'nl.dionsegijn:konfetti:1.0'
}
There is always room for improvement.
Did you encounter bugs? Report them here. The more relevant information you provide the easier and faster it can be resolved.
As mentioned, there is always room for improvement. Do you have any performance improvement ideas? Please suggest them here. Before submitting a large Pull Request, creating an issue to discuss your ideas would be the preferred way so we can be sure it is in line with other improvements currently being developed. Is it a simple improvement? Go ahead and submit a Pull Request! I very welcome any contributions.
In line with the previous contribute section there are some already known issues that could be resolved and are open for discussion.
Konfetti is released under the ISC license. See LICENSE for details.