It is kind of hard to implement animations in native Android with either Kotlin or Java. These animation libraries for Android will help you make this task more comfortable.
Lottie can render After Effects animations natively on Android and iOS, Web, and React Native. It parses Adobe After Effects animations exported as json with Bodymovin and renders them natively on mobile.
Read also: 8 Best Flutter Animation Libraries
This library is a collection of useful animation views. It supports lots of animation types, including attension, special (hinge, roll, landing, etc..), bounce, fade, flip, rotate, slide, and zoom.
You can start an animation on a view with a line of code
YoYo.with(Techniques.Tada) .duration(1000) .repeat(20) .playOn(findViewById(R.id.my_view));
Transition Everywhere is a set of extra Transitions on top of AndroidX Transitions library.
This framework automatically animates layout change caused by a state of your children views. It supports new animation chaining while old one is still running.
This library is a view which allows card flipping animation like Flipboard does. It supports horizontal flipping, an event listener to get notified when flipping finishes, content reloading when flipping, and different bitmap format for animation.
FragmentTransactionExtended makes switching fragments no longer boring. It is a plugin which provides a set of custom animations between fragments.
Supported animation types:
FragmentTransactionExtended fte = new FragmentTransactionExtended(context, fragmentTransaction, firstFragment, secondFragment, containerID); FragmentManager fm = getFragmentManager(); FragmentTransaction fragmentTransaction = fm.beginTransaction(); FragmentTransactionExtended fte = new FragmentTransactionExtended(this, fragmentTransaction, firstFragment, secondFragment, R.id.fragment_place); fte.addTransition(FragmentTransactionExtended.GLIDE); fte.commit();
With 50+ builtin animations, EasyAndroidAnimations is designed to help developer create view animations in an Android app easier. It can create many complex animation effects with one or two lines of code.
BounceAnimation(yourView) .setBounceDistance(100) .setBounces(10) .setDuration(1000) .animate();
InterfaceInteraction library is an interesting animation library. It can capture any interface (screen or view) and throws its UI elements over under the influence of gravity which depends on device’s accelerometer data. Those views then move them from side to side obliquely.
It is an extension to ImageView and add Ken Burns effect (a type of panning and zooming effect) to the view.
- Control: Duration and pause/resume state can be changed easily. It supports events like onTransitionStart() and onTransitionEnd() for developers to control the effect better.
- Highly extensible: Options like rectangles to be zoomed and panned can be set.
- Libs friendly: This is a direct extension of ImageView so it seamlessly works out of the box with your favorite image loader library.
- Easy to use: The effect can be done by just replacing ImageView view in your XML layout files by com.flaviofaria.kenburnsview.KenBurnsView one.
The library allows you to create a smooth animated transition between views, hence reveal animator.