https://github.com/seo-4d696b75/glance-widget-demo
Android demo app & widget implemented with androidx.glance
https://github.com/seo-4d696b75/glance-widget-demo
Last synced: 2 months ago
JSON representation
Android demo app & widget implemented with androidx.glance
- Host: GitHub
- URL: https://github.com/seo-4d696b75/glance-widget-demo
- Owner: Seo-4d696b75
- License: mit
- Created: 2023-12-04T08:57:04.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-22T09:36:14.000Z (10 months ago)
- Last Synced: 2025-05-08T23:43:53.683Z (2 months ago)
- Language: Kotlin
- Size: 188 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# glance-widget-demo
Android demo widget implemented
with [Glance](https://developer.android.com/jetpack/androidx/releases/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 operationBuild app & widget
```shell
./gradlew app:assembleRelease
```Run unit test
```shell
./gradlew widget:test
```### widget overview
| user interaction | dark mode |
|--------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
|  |  |### configuration
| configuration when added | reconfiguration for existing |
|------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|
|  |  |## Adding a widget in-app
Can be added from in-app operation as well as from the home screen.
| No configuration | With configuration |
|------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|
|  |  |## 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