Google has released Android Studio Dolphin. The new release of the development environment for mobile applications on Android mainly brings extensions for creating UIs with Jetpack Compose and for emulating the Wear OS smartwatch operating system.
Similar to how previous Android releases had the names of candies in alphabetical order, since 2021 every Android Studio version has an animal as its godfather. After Arctic Fox (arctic fox), Bumblebee (bumblebee) and Chipmunk (chipmunk), this time it’s the dolphin’s turn.
Android Studio is based on JetBrain’s IntelliJ IDEA development environment, and the basis for the current release is IntelliJ IDEA 2021.3 released in December 2021. Its number is included in the version of Android Studio, which has the version number 2021.3.1.
Parallel previews for Compose
For the integration of Jetpack Compose introduced in Arctic Fox for creating user interfaces with a declarative approach, the current release brings three major additions: Multipreview Annotations, an Animation Inspector and a Recomposition Counter. Under the first keyword, the IDE introduces annotation classes to define defaults for the preview UI elements.
Android Studio previews several variants of UI elements.
The classes contain several @Preview annotations for different device types or with different parameters for themes, colors, fonts, as in the following code example from the documentation:
@Preview( name = "small font", group = "font scales", fontScale = 0.5f ) @Preview( name = "large font", group = "font scales", fontScale = 1.5f ) annotation class FontScalePreviews
Android Studio simultaneously displays the variants defined in the annotation classes in the preview window.
Blick in die Animation
A new feature is the Animation Inspector, which, analogous to analyzing the structure of the UI with the Layout Inspector, provides a deeper insight into the animations. Playback can be done at different speeds via the timeline, by manual dragging, or by frame. Currently, the preview only works for animations created with the updateTransition API. More details can be found in the documentation.
The animation preview can highlight the visibility of the elements in the timeline.
Also new in interaction with Jetpack Compose is the Recomposition Counts view, which shows how often the UI is updated.
Android Studio Dolphin now has the Wear OS Emulator Pairing Assistant on board for testing applications on Google’s smartwatch operating system. Developers can use this to connect one or more emulators to a smartphone without connecting them manually. The IDE remembers the connected emulated devices and can pair them again with the next test.
Clicking on the toolbar icons triggers the smartwatch actions in the emulator.
Also new in the Wear OS emulator is a toolbar that can be used to trigger actions such as pressing a button or tilting the watch. Finally, the IDE can now process run/debug configurations that lead directly to the appropriate interface of the application and process the corresponding Wear OS tiles and clock faces including complications for extended information, for example on the battery charge level.
More information about Android Studio Dolphin such as the simplified Gradle settings for emulating different devices can be found on the Android Developers blog.
To home page