Particle-Rain is library to rain your drawable on android
Step 1 : Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2 : Add the dependency:
dependencies {
implementation 'com.github.SudoDios:Particle-Rain:1.0.1'
}
<me.sudodios.particlerain.ParticleRainView
android:id="@+id/particleRainView"
android:layout_width="match_parent"
app:prv_color="#fffafa"
app:prv_maxCount="300"
app:prv_res="@drawable/snow"
app:prv_speed="0.5"
android:layout_height="match_parent"/>
binding.particleRainView.apply {
//set color of particles
color = Color.WHITE
//max count to draw particles
maxCount = 100
//speed of rain
speed = 0.5f
//drawable res ID to draw on particles view
setParticleDrawableResId(me.sudodios.particlerain.R.drawable.snow)
}
1 - Support multiple drawable
2 - Support multiple colors
reference to main code Telegram