25 New Android Libraries You Definitely Want to Try

As an Android developer, leveraging high-quality libraries in your projects can significantly boost your productivity, app performance, and user experience. Thankfully, the passionate Android community is constantly creating and sharing innovative libraries that tackle common pain points and enable exciting new capabilities.

While the core Android framework provides a solid foundation, these third-party libraries add a layer of "extra spice" that can take your app from good to great. This is especially true when it comes to animation – an area that has seen tremendous advancements and interest from the Android community over the past year.

In this in-depth post, we‘ll take a detailed look at 25 of the most exciting, useful, and innovative Android libraries that you should consider trying out in 2017. Several of these libraries relate to animation and visual effects, which can have a profound impact on your app‘s user experience when done well. We‘ll examine why these libraries are uniquely powerful and provide concrete examples of how you can put them to work in your own projects.

By the end of this post, you‘ll have a solid grasp on some of the latest tools and techniques being used by expert Android developers to build world-class apps. Let‘s get started!

1. Lottie

One of the most significant Android libraries to emerge in recent months is Lottie, a stunning animation library from Airbnb. Since its release in February 2017, Lottie has earned over 14,000 stars on GitHub and become the go-to solution for incorporating After Effects animations into Android apps.

Lottie works by parsing Adobe After Effects animations exported as JSON via the Bodymovin plugin and then rendering them natively on Android and iOS. This allows designers to leverage the powerful and familiar After Effects tooling to create expressive animations and then hand them off to developers who can easily integrate them into the app with minimal coding.

Here‘s a basic example of how to get started with Lottie in your Android app:

class MainActivity : AppCompatActivity() {
    private val animationView: LottieAnimationView by lazy {
        findViewById<LottieAnimationView>(R.id.animation_view)
    } 

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        animationView.setAnimation(R.raw.hello_world)
        animationView.loop(true)
        animationView.playAnimation()
    }
}

As you can see, it only takes a few lines of code to load and play an After Effects animation using Lottie. This eliminates the traditional friction involved in translating complex animations from design tools to actual application code.

Since its launch, Lottie has already been used in production apps by Google, Dropbox, Uber, and many more companies. If you want to captivate your users with rich, unique animated experiences, Lottie is definitely a library you‘ll want in your toolkit.

2. Rebound

Another powerful library for crafting interactive motion on Android is Rebound, an open-source project from Facebook. Rebound makes it easy to add realistic, physics-based animations to your app‘s UI components.

The library is based on the concept of spring dynamics, which models the motion of objects as if they were attached to a spring. This allows you to create fluid, organic-feeling animations that mirror how objects behave in the real world.

To use Rebound, you first create a SpringSystem to manage all of your springs:

SpringSystem springSystem = SpringSystem.create();

Then you can create individual springs, configure their tension and friction properties, and attach listeners to respond to the spring‘s motion:

Spring spring = springSystem.createSpring();
spring.setSpringConfig(SpringConfig.fromOrigamiTensionAndFriction(40, 3));

spring.addListener(new SimpleSpringListener() {
    @Override
    public void onSpringUpdate(Spring spring) {
        float value = (float) spring.getCurrentValue();
        myView.setScaleX(value);
        myView.setScaleY(value);
    }
});

spring.setEndValue(1);

In this example, the spring‘s motion will animate the target view‘s scale as the spring is released. The spring dynamics cause the animation to smoothly settle into place rather than abruptly stopping.

Rebound gives you a flexible set of tools for adding delightful, physically-realistic motion to your app. It‘s trusted by Facebook, Instagram, Google, and many others. Give your UI components a polished look and feel with this powerful animation library.

3. Transitions Everywhere

The Android Transitions API, introduced in Android 4.4 KitKat, makes it possible to create elegant animations when transitioning between layouts or activities. However, this API was only made available to devices running Android 5.0 Lollipop and newer.

Enter Transitions Everywhere, a clever library that backports the Transitions API to older Android versions, all the way back to Android 4.0 Ice Cream Sandwich. With Transitions Everywhere, you can leverage the full power of the Transitions API and its shared element transitions, view state transitions, and more, regardless of what version of Android your users are running.

Here‘s an example of how you can create a shared element transition between two activities using Transitions Everywhere:

val options = ActivityOptions.makeSceneTransitionAnimation(
    this, 
    Pair(avatarImageView, "avatarTransition")
)
startActivity(intent, options.toBundle())

And in the XML of the receiving activity:

<ImageView
    android:id="@+id/avatar"
    android:layout_width="100dp"
    android:layout_height="100dp"
    android:transitionName="avatarTransition" />

By specifying a common transitionName, the avatar ImageView will be animated between the two activities, creating a seamless transition effect.

According to the library‘s documentation, Transitions Everywhere is used by 25,000+ Android apps, including Google Play and Google Contacts. It‘s a great way to add polished transition animations to your app while still supporting older devices.

4. Konfetti

Who doesn‘t love a good confetti celebration? With the Konfetti library, you can add a joyful burst of confetti to your Android app with minimal effort.

Konfetti is a lightweight particle system that lets you configure the size, shape, and number of confetti pieces, as well as their explosion direction, speed, rotation, and more. You can trigger the confetti explosion at any point in your app, such as when the user completes a task or reaches a milestone.

The code for using Konfetti is quite straightforward:

val konfettiView = findViewById<KonfettiView>(R.id.konfettiView)

konfettiView.build()
    .addColors(Color.YELLOW, Color.GREEN, Color.MAGENTA)
    .setDirection(0.0, 359.0)
    .setSpeed(1f, 5f)
    .setFadeOutEnabled(true)
    .setTimeToLive(2000L)
    .addShapes(Shape.Square, Shape.Circle)
    .addSizes(Size(12))
    .setPosition(-50f, konfettiView.width + 50f, -50f, -50f)
    .streamFor(300, 5000L)

In just 10 lines of code, you‘ve configured a dazzling confetti effect with custom shapes, colors, sizes, and more.

Since its release in early 2017, Konfetti has been used to add a spark of delight to apps like Lyft, Skyscanner, and Quizlet. It‘s a great example of how a focused, easy-to-use animation library can inspire Android developers to incorporate more fun and personality into their apps.

5. EasyFlipViewPager

Flipping through pages in a book or magazine is a familiar physical interaction that can also translate well to digital contexts. The EasyFlipViewPager library brings this page flipping interaction to Android‘s ViewPager component, complete with a realistic curling page effect.

EasyFlipViewPager is a great choice if your app has book or magazine-like content that users will swipe through. You can use it to create a more immersive, tactile navigation experience.

Here‘s how you set up an EasyFlipViewPager in your XML layout:

<com.wajahatkarim3.easyflipviewpager.BookFlipPageTransformer
    android:id="@+id/viewPager"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

Then in your activity or fragment code:

// Get the reference to the view pager
val viewPager = findViewById<BookFlipViewPager>(R.id.viewPager)

// Set the adapter
viewPager.adapter = MyAdapter()

// Enable the page transformer
val transformer = BookFlipPageTransformer()
viewPager.setPageTransformer(true, transformer)

And that‘s it! With just a few lines of code, you have a view pager with a slick page flipping animation.

Since launching in early 2017, EasyFlipViewPager has been starred over 1,500 times on GitHub. If your app could benefit from a more tactile paging experience, this library is definitely worth checking out.

Additional Animation Libraries

While we don‘t have space to give them all the full treatment, here are a few more animation libraries released in early 2017 that are worth experimenting with:

  • Spotlight – A library for showcasing specific views or parts of your UI with a fun spotlight animation. Great for in-app tutorials and feature discovery.
  • Slide – A simple ‘Slide to Unlock‘ view with a smooth sliding animation that can be used for confirmation actions, like ‘Slide to delete‘ or ‘Slide to send‘.
  • Material Ripple Layout – Brings the material ripple effect to any view, allowing you to create responsive, interactive touch effects across your UI.
  • Rotatable – Lets you rotate views with a fluid gesture animation. Useful for creating spinnable UI components or control knobs.

Conclusion

As an Android developer, you have an incredible array of libraries, tools, and techniques at your disposal for creating rich, animated experiences in your apps. 2017 has already seen the release of dozens of exciting new libraries that push the boundaries of what‘s possible on the platform.

In this post, we‘ve taken a deep dive into some of the most notable animation-related libraries to emerge so far this year. These libraries make it easier than ever to add delightful animated effects to your app, from complex After Effects animations with Lottie, to realistic physics-based motion with Rebound, to confetti explosions with Konfetti.

But beyond the technical details of each library, the broader trend to note is that Android developers are increasingly recognizing the importance of animation and motion design in creating captivating user experiences. By thoughtfully applying animation throughout your app, you can create interfaces that feel more intuitive, responsive, and emotionally engaging.

As you explore and experiment with these libraries, remember that animation is a powerful design tool that should be wielded with restraint and purpose. Strive to use animation in ways that genuinely enhance the user experience, rather than just adding superficial visual noise.

2017 is shaping up to be a landmark year for Android animation. As the tools and techniques continue to evolve, I can‘t wait to see the innovative ways that Android developers will harness them to build ever-more delightful and dynamic user experiences.

What are your favorite Android animation libraries? Did I miss any great ones that you‘ve discovered? Let me know in the comments below!

This post was written by Jake Petroules, Lead Android Engineer at TK. Ticket Tailor is a ticketing platform that powers thousands of events across the globe. Join our team and help us build the next generation of live event technology.

Similar Posts