Top Ad unit 728 × 90

Google releases Jetpack Glance Alpha for super-easy widget development

Jetpack Compose makes it possible to create interfaces for Android apps without dealing with lengthy XML files and other clunky resources. Instead, it allows developers to create interface elements in Kotlin code (alongside the rest of the app’s code), with simpler APIs and full Material Design support. Now Google is bringing that same ease of use to widgets, with the introduction of Jetpack Glance Alpha.

Google wrote in an announcement, “Android 12 revamps a key feature for many Android users, App Widgets, making them more useful, beautiful, and discoverable (84% use at least 1 widget). Today, we’re making it even easier to build them by releasing the first alpha of Jetpack Glance, a new framework built on top of the Jetpack Compose runtime designed to make it faster and easier to build app widgets for the home screen and other surfaces.”

Jetpack Glance structure

Jetpack Glance structure (Credit: Google)

Jetpack Glance allows app developers to create widgets with similar declarative Kotlin-based APIs as Jetpack Compose. This first alpha build includes an initial set of Glance Composables (Box, Row, Column, Text, Button, LazyColumn, Image, Spacer), a few predefined actions (actionStartActivity, actionRunCallback, etc.), and interoperability with existing RemoteViews.

Jetpack Glance was mentioned at the Android Dev Summit back in October, but now it’s actually available for developers to try. There’s a code sample on GitHub, and Glance is compatible with the latest stable build of Android Studio.

Google has rolled out several other improvements for Jetpack Compose in recent months. Support for Material You and Wear OS arrived in October, Compose for creating Android Auto apps was released in March, and Jetpack Compose itself left the beta stage in July. There’s also work underway to bring Jetpack Compose to the web, which would allow an app with a single codebase to run across, Android, macOS, Windows, Linux, and web browsers.

The post Google releases Jetpack Glance Alpha for super-easy widget development appeared first on xda-developers.



from xda-developers https://ift.tt/3yy0qn1
via IFTTT
Google releases Jetpack Glance Alpha for super-easy widget development Reviewed by site on ديسمبر 16, 2021 Rating: 5

ليست هناك تعليقات:

Apple’s 2022 product lineup will reportedly include new Mac Pros, a VR headset, redesigned MacBook Air, and more

2021 was an eventful year for Apple, with the company releasing many category-defining products across the board including an M1-powered iP...

All Rights Reserved by iphone forum © 2014 - 2015
Powered By Blogger, Designed by Sweetheme

نموذج الاتصال

الاسم

بريد إلكتروني *

رسالة *

يتم التشغيل بواسطة Blogger.