Observing data asynchronously is such a core skill for mobile developers that you may imagine Android has a long-established set of simple APIs in...
Android Dev Summit 2019 Recap
Another year and another Android Dev Summit has wrapped up. This year, a few of us Nerds were lucky enough to attend Google’s conference and we wanted to share the biggest highlights from the conference in case you missed it.
Modern Android Development
A major theme of this year’s Dev Summit is what Google is calling Modern Android Development. Modern Android Development consists of the team’s recommended approach and opinions to app structure, as well as the tools to make implementing that approach not only the best but also the fastest and easiest approach. The team at Google provided some great tools to achieve this through the current Jetpack offerings and they continue to invest in this—as evidenced by the great new tools that Google announced at Dev Summit this year.
One of the biggest (and, in my opinion, most exciting) topics at the Dev Summit was Jetpack Compose. Compose was initially announced at Google I/O earlier this year and is a new declarative UI toolkit for Android. The big news is that it is now much easier to try Compose. In the past, trying Compose involved a complicated process, but it is now as simple as adding some Gradle dependencies in a project using the newly released Android Studio 4.0 Canary 1.
In addition to being easier to try, they showed off handy features like Composable previews in the editor, a new Setup Wizard option to add a Compose Activity, and interoperability between Compose and the existing View system.
Keep in mind that this is still a very early version. The team made sure to emphasize that this is not ready for production yet since things are very likely to change as development continues. But, if you want to try it out, there is updated documentation available, including a codelab and a sample project.
Also announced as part of Android Studio 4.0 Canary 1 was the Motion Editor. It is a visual editor for creating animations and transitions for MotionLayout. It even lets you add click and swipe handlers right from the editor and it will generate the necessary code for you behind the scenes. We hope to have a more detailed post on Motion Editor soon, so keep an eye out on our blog!
Live Layout Inspector
The team showed off an updated Layout Inspector tool. It has many of the same features of the existing layout inspector, but with several new additions. To start, this new Inspector will show a live updating layout hierarchy as the views on your device change. It also includes tools to allow you to drill into resources right from the view to find where values like text and colors originate (trust me, it’s way cooler than it sounds). Lastly, they also showed off a cool 3D “exploded” view. In addition to looking awesome, it can help you identify issues with overdraw that can negatively affect UI performance.
Unfortunately, this isn’t available in the AS 4.0 Canary 1, but they said it should be coming soon.
And so much more!
In addition to these major new features, there were a ton of other things announced. This includes a new way to work in both Layout XML and Design views side-by-side, a new Build Profiler tool that can help to easily identify bottlenecks and slowdowns in your builds, improved Kotlin DSL support for Gradle, and a super cool way to use an emulator directly in the IDE.
In addition, there were some great talks that cover a wide range of topics. I personally recommend checking out the talks on LiveData with Coroutines and Flow, Debugging Tips and Tricks, and the Opinionated Guide to Dependency Injection.
With all the new things being announced, it’s really exciting to see how the future of Android continues to evolve. With that, I’m off to go play with Compose and the new MotionEditor…