Android - Make firework animation - Library

Step 1: Add this in build.gradle --> dependencies:

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

Bài đăng phổ biến từ blog này

Android - Date Time - Lấy giá trị ngày, giờ theo định dạng tùy biến trong Android Studio

Android - Custom SearchView - Tạo khung tìm kiếm đơn giản trong Android Studio

Android - Image - Take Photo, Choose Photo from Gallery - Xử lý chụp ảnh, lấy ảnh trong Android Studio