BLOG

Android Trends in 2020

Android Trends in 2020

App developers are constantly working on new methods to simplify and shorten the development process on one hand and build the best designs and user experience on the other. Each year we can see the continuing emergence of new, cutting-edge techniques and tools in mobile apps development. Here we present the trends that will give you a better insight into what should be on top in year 2020.

Kotlin Coroutines

If you have not used Kotlin Coroutines yet, it is high time to start using them. They are one of the best ways to make asynchronous tasks. Since Google announced Kotlin First, it has become natural to use Coroutines. They are not just a simple tool for creating sync tasks, they also have advanced features like:

  • Channels
  • Flows
  • Continuations

There are also useful extensions for ViewModel and LiveData:

Coroutines vs RxJava2

It is not an article about differences so we do not want to go into deep details. The main difference is that RxJava2 is a really powerful tool not only for async tasks. If you ask us what solution you should use, the answer is simple, it depends on your requirements, so we suggest you read more about these tools and make a deliberate decision.

Themes

Since Android 10, Google officially has supported a dark theme. It means we can rely on system settings, and adjust our app to system theme. Multiple themes support have already been added to many apps like Instagram, Chrome or just Medium. You can use also new Material Components Styles in version 1.1.0 to support the dark theme functionality in Android Q. Unfortunately this is still in beta. More information here.

Jetpack Security

Google has put a really big effort to improve security on Android devices for the last years. Not every app needs really advanced solutions, but what we would like to highlight is the new security library from Google.

Jetpack Security is a way to store data more securely in Shared Preferences. The most important thing is that the library uses Android Keystore System. It has been announced lately and is in alpha version. Check it out here.

Navigation Component

Google introduced Navigation Component at Google IO in 2018 and it took almost a year to prepare a stable version, which was released in March 2019.

It is a completely new approach for designing a navigation graph for Android apps. This solution is similar to that from iOS which is called Story Boards. We implement a navigation graph in Navigation Editor or just editing XML files. Navigation Component supports things like fragment transactions, deep links, SafeArgs and even view model scopes.

More about Navigation Component here.

ViewPager 2

View Pager and Recycler View. This sounds great, but it was not possible before. Now with View Pager 2, it is possible.

Moreover, since the 20 of November 2019, View Pager 2, has been released in a stable version.

View Pager 2 brings us a lot of improvements:

  • works with RecyclerView
  • support for vertical orientation
  • new PageChangeCallback — no need to override all 3 methods
  • added different Page Transformers

If you want to find out more about View Pager 2, check this article.

Saved State

This is a library which helps us to save instance state. Why is it even needed if ViewModel can survive configuration changes? A configuration change is not the only case. Android Developers should be aware of system-initiated process death as well. For this, we should save the state serialized in disk space and now we have this built-in ViewModel.

The stable version has been available since September 2019, but there is also extension library ViewModel-SavedState in RC-03 version.

Jetpack Compose

Last but not least, Jetpack Compose. To be honest, We have really high hopes for this. It is a totally new way of creating views in Android. We can even say finally we have something like that. This solution is a reactive way to create UI and it is entirely written in Kotlin!

If you want to try Jetpack Compose, check out this tutorial.

Unfortunately, Jetpack Compose is not even in the alpha version, it is in Developer Preview.

Summary

In 2019 there were a few news in the Android world. Obviously the biggest is Jetpack Compose, but it can take a long time to make it stable. It may not even happen in 2020, but for sure it is worth learning and it is a future of building views in Android.

Recent Blogs