Konfetti
介绍:
一个轻量的纸屑粒子效果。
运行效果:
使用说明:
下载
download the APK here
XML
<nl.dionsegijn.konfetti.KonfettiView
android:id="@+id/viewKonfetti"
android:layout_width="match_parent"
android:layout_height="match_parent" />
Example
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)
dependency
dependencies {
compile 'nl.dionsegijn:konfetti:1.0'
}
已下载
0