The person who posted it Ksenia ShumelchykAndroid Developer Communication Engineer
Today we’re launching version 1.0 of Compose for Wear OS, the first stable of our modern expressive UI toolkit designed to help developers create beautiful and responsive apps for the Google smartwatch platform.
Compose for Wear OS is built from the bottom up in Kotlin with modern app architecture in mind. By adopting a declarative approach and providing a powerful Kotlin syntax, it makes building apps for Wear OS easier, faster and more intuitive.
The toolkit not only simplifies UI development, but also provides support for Wear OS with built-in Material Design, a set of rich UI components optimized for visual experience, and comes with many powerful tools in Android Studio to streamline UI iteration.
What does this mean?
The release of Compose for Wear OS 1.0 means that the API is stable and has everything you need to build production-ready apps. moving forward Write for Wear OS is our recommended approach to building user interfaces. For Wear OS apps.
Write your feedback Wear OS. Our developer community has been with us every step of the way, engaging with us on Slack and providing feedback on APIs, components, and tools. We continue to welcome developer feedback and suggestions as we work to bring new features to Compose for Wear OS.
We’re also excited to share how developers have embraced Write on their Wear OS apps and what they love about it.
What developers are saying.
Todoist helps people organize, plan, and collaborate on projects. They were one of the first companies to completely rebuild their Wear OS app, rewriting and redesigning all screens and interactions.
“We’re excited to announce the new Wear design language and Compose for Wear OS. It gave us a new impetus and opportunity to invest into the platform.“
Todoist app |
Relying on Comose for Wear OS has improved both the developer and user experience for Todoist.
“Compose for Wear OS has helped us on both the development and design side. The guidelines and documentation make it easy for our product designers to develop comics that match the platform’s new design language. And the libraries have made it very easy for us to implement these by providing all the necessary widgets and enhancements. Swipe to Dismiss, TimeText, ScalingLazyList were all components that worked well for us out of the box and still allowed us to create an intuitive and unique app.
Be active outside It helps people plan routes for hiking, biking, running, and other outdoor adventures. With wearables a key aspect of their product strategy, they have been quick to update their offerings for the consumer’s wrist app.
An application that works outdoors |
Outdooractive has already adopted Wear OS 3, and by migrating to Compose for Wear OS, they’re starting to realize the developer-side benefits of having a modern code base and increasing development productivity:
“A big improvement is how lists are created. Thanks to ScalingLazyColumn, creating a scrolling screen without wasting resources (compared to RecycleView) is easy. The availability of standard components such as chips helps to save time by being able to use pre-made design-/view-parts. What could have taken us days now takes us hours.“
The Outdoor Active team also pointed out that using Compose for Wear OS will help them strive for better app quality.
“Improved animations Hiding/unhiding components seamlessly by wrapping them in “AnimatedVisibility” was a nice surprise; We’ve used it in places where we wouldn’t normally spend any time implementing animation.“
Another developer we’ve been working with, PeriodTracker, helps track menstrual cycles, ovulation, and chances of conception.
Period Tracker app |
They used our UI toolkit to dramatically improve the user interface and quickly develop new features only available on Wear OS:
“Compose for Wear OS gives us a lot of kit to help us bring our designs to life. For example, we used chips to design keystrokes for time recording, drinking water, and taking medicine, and so on He helped us create a unique look for the latest Kegel workout.“
Similar to other developers, Period Tracker says Compose for Wear OS has helped them create a better developer experience and improved collaboration with design and development teams.
“For example, before the chips components were available, we had to use a custom way to load images onto the buttons, which created a lot of adaptation work. Yes, Compose for Wear OS has improved our productivity and made our designers more willing to design better user experiences for wearables.“
Check out our in-depth case studies to learn more about how other developers are using Jetpack Compose.
1.0 release
Let’s take a look at the key features with the 1.0 release:
- Material: The Wear OS text editor’s material catalog already offers many more components than view-based layouts. The components follow the material style and implement material themes, allowing you to customize the design for your brand.
- Explainer: Compose for Wear OS uses modern Android development and works seamlessly with other Jetpack libraries. Composition-based UIs in most cases result in less code and generally speed up the development process, read more.
- Workable: If you have a Wear OS app with a large view-based codebase, it’s possible to gradually adopt Compose for Wear OS using Compose’s interactive APIs instead of rewriting the entire codebase.
- It contains different time forms: Compose for Wear OS expands the Compose base by adding a DSL for all curved elements to make it easy for all Wear OS device shapes: circle, square or rectangle with minimal code.
- Performance: Each Compose for Wear OS library ships with its own source profiles that are automatically integrated and distributed with your app’s APK and precompiled on device. In most cases, this makes application performance for architectures on par with view-based applications. However, it is important to know how to configure, develop and test the performance of your application for best results. know more.
Note that using version 1.0 of Compose for Wear OS requires version 1.2 of the androidx.compose library and therefore Kotlin 1.7.0. Read more about the Jetpack Compose 1.2 release here.
Tools and libraries
Android Studio
The change in the specification paradigm also changes the development workflow. The authoring tool in Android Studio helps you build apps more efficiently.
Android Studio Dolphin includes a new project template with Compose for Wear OS to help you get started.
A scalable preview annotation lets you instantly see how your app’s layout works on different clock shapes and sizes. You can configure the device preview to show different Wear OS device shapes (round, rectangular, etc.).
Starting with Android Studio Electric Ill, LiveEdit for Wear OS supports iterative code development, providing instant feedback as you make changes in the editor and instantly mirroring the UI when previewing or running an app on the device.
Horologist
Horologist is a team of open source libraries that complement Wear OS development, which we announced in the beta release of Wear OS Compose for Wear OS. Horologist launched several stable experimental APIs including TimeText fadeAway improvements, WearNavScaffold, date and time pickers.
Date and time selectors from the horologist’s library |
Write a text
If you don’t know how to use it Prepare JetpackWe recommend starting with Tutorial. Many of the same development principles apply to Compose for Wear OS.
To learn more about Wear OS, check out:
Now that Compose for Wear OS has reached its first stable release, it’s time to create beautiful apps built for the wrist with Compose.
Join the community
Join the conversation in the Kotlin Slack # Essay-dress A channel to connect with the team and other developers and share what you’re building.
Leave a comment
Please continue to provide feedback on the issue tracker and let us know your experience!
For more information on building apps for Wear OS, check out the developer site.