Beautiful falling paper pieces animation in an Android App, built using Kotlin and XML. A highly reusable and customizable module that can be used in games, welcome screens, and whatnot.
Do you want this library to have more features? Then make a pull request or write me an email at dopedevx@gmail.com
Download demo app from: https://github.com/DopeDevX/CongratsShower/raw/master/DEMO.apk
-
Include maven into the repositories block present inside allprojects block in your project level
build.gradle
(For Groovy)build.gradle.kts
(For kotlin) file.Groovy :
allprojects { repositories { jcenter() maven { url "https://jitpack.io" } // add this line } }
Kotlin :
allprojects { repositories { jcenter() maven { url = uri("https://jitpack.io")} // add this line } }
-
Add the following line inside the dependencies block of your module level
build.gradle
(For Groovy)build.gradle.kts
(For kotlin) file.Groovy :
dependencies { ... implementation 'com.github.DopeDevX:CongratsShower:1.69.420' // add this line ... }
Kotlin :
dependencies { ... implementation ("com.github.DopeDevX:CongratsShower:1.69.420") // add this line ... }
-
Initialize CongratsShower with two parameters: A. Reference of the root layout of the activity where you want the shower as a ViewGroup. B. Context of the activity.
val shower = CongratsShower(layoutVariable, context)
Then, call the perfromShower() method.
shower.performShower() //~~~~~ OR ~~~~~ shower.performShower(runtimeInMilliseconds)
You can also study the code base and make necessary adjusments as per your use case.