Particle animation library for Android
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.ibrahimsn98:android-particles:2.0'
}
<me.ibrahimsn.particle.ParticleView
android:id="@+id/particleView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:particleCount="60"
app:particleMinRadius="3"
app:particleMaxRadius="10"
app:particlesBackgroundColor="#23262a"
app:particleColor="@android:color/holo_green_dark"
app:particleLineColor="@android:color/holo_green_dark"
app:particleLinesEnabled="true" />
class MainActivity : AppCompatActivity() {
private lateinit var particleView: ParticleView
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
particleView = findViewById(R.id.particleView)
}
override fun onResume() {
super.onResume()
particleView.resume()
}
override fun onPause() {
super.onPause()
particleView.pause()
}
}
Thanks to VincentGarreau for sharing that awesome javascript library
- Performance optimizations
- RAM optimizations
- Touch Event Animations
MIT
Follow me on Twitter @ibrahimsn98