Android - Make firework animation - Library
Step 1: Add this in build.gradle --> dependencies:
compile 'com.plattysoft.leonids:LeonidsLib:1.3.2'
.setSpeedRange(0.1f, 0.25f).setFadeOut(300)
.setScaleRange(0,1)
.setStartTime(0)
.oneShot(v, 30);
More: https://github.com/plattysoft/Leonids
compile 'com.plattysoft.leonids:LeonidsLib:1.3.2'
Step 2: Use in Activity:
private void fireworkAnimation(View v){
new ParticleSystem(this, 30, R.mipmap.your_image, 1500).setSpeedRange(0.1f, 0.25f).setFadeOut(300)
.setScaleRange(0,1)
.setStartTime(0)
.oneShot(v, 30);
}
Have fun!
More: https://github.com/plattysoft/Leonids
Nhận xét
Đăng nhận xét