Skip to content

Android demo app & widget implemented with androidx.glance

License

Notifications You must be signed in to change notification settings

Seo-4d696b75/glance-widget-demo

Repository files navigation

glance-widget-demo

Android demo widget implemented with Glance

Note

version androidx.glance:glance*:1.1.0 is used

Features

  • ✅ Stateful widget
  • ✅ Handles user interaction
  • ✅ Async operation on Worker
  • ✅ Supports dark mode by Material3 color system
  • ✅ Supports widget configuration (optional for Android 12 and above)
  • ✅ Supports reconfiguration (only for Android 12 and above)
  • ✅ Hilt with GlanceAppWidget and Worker
  • ✅ Unit test for glance ui
  • ✅ Can be added with in-app operation

Build app & widget

./gradlew app:assembleRelease

Run unit test

./gradlew widget:test

widget overview

user interaction dark mode
async_glance tap_glance_dark

configuration

configuration when added reconfiguration for existing
glance_configure glance_reconfigure

Adding a widget in-app

Can be added from in-app operation as well as from the home screen.

No configuration With configuration
add_widget_inapp add_widget_inapp_configure

Modules structures

  • app
  • theme common Material3 color and theme definition for Jetpack Compose and Glance
  • ui implementation with Jetpack Compose
  • widget implementation with Glance
  • domain repository interface definition
  • data repository implementation

About

Android demo app & widget implemented with androidx.glance

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages