How to Add ParticleSmasher in Android App

Codeplayon
1 min readDec 10, 2022

--

How to Add ParticleSmasher in Android App

A demonstration GIF is below to help you get an idea of the process we will do in this post. It is important to note that we will build this application using Java. So let’s start to make an example using the library.

Start your android studio and create a new project and build it after successfully syn it first Add the dependency.

Android Image Particle animation library Example.

Step 1. Add the JitPack repository to your build file

Add it to your root build.Gradle at the end of repositories:

allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}

Step 2. Add the dependency

dependencies {
    implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.github.codeplayon:ParticleSmasherLibrary:v1.0.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
}

After Sync your project and get the dependencies file and add your main activity java class file below the code and steps.

 private ParticleSmasher mSmasher;

case R.id.iv_main_3:
mSmasher.with(view)
.setStyle(SmashAnimator.STYLE_FLOAT_TOP)
.setHorizontalMultiple(2)
.setVerticalMultiple(3)
.setDuration(2500)
.start();
break;

Read More:-

--

--

Codeplayon
Codeplayon

Written by Codeplayon

Codeplayon - Mobile App Development & SEO Digital Marketing Company , Gurugram & Delhi, visit our website :-https://www.codeplayon.com/ Mobile No:- 9671718285

No responses yet