Skip to content

feat: Introduce new widget styles with dynamic theming#1155

Merged
theovilardo merged 5 commits intotheovilardo:masterfrom
adlifarizi:impl/widget-styles
Feb 20, 2026
Merged

feat: Introduce new widget styles with dynamic theming#1155
theovilardo merged 5 commits intotheovilardo:masterfrom
adlifarizi:impl/widget-styles

Conversation

@adlifarizi
Copy link
Copy Markdown
Contributor

Description

This PR introduces three new glance widget styles (BarWidget4x1, ControlWidget4x2, GridWidget2x2) to improve the home screen experience. It also includes support for dynamic themes, which follow the user's Player Theme preferences using system dynamic or album art, as well as following the pallete style album art preferences.

Note

I deleted the old widget from the receiver manifest so that the old widget did not appear in the picker widget, but I did not delete all files related to the old widget if needed in the future or as a reference

Because this is related to M3E design, maybe I need your approval/feedback. Here are some screenshots for the review

Widget Picker Preview

image

**Widget Homescreen Preview **

*This screenshot is in system dark theme, I forgot to include light theme, but the color follow actual full player theme
image
image

Introduces three new home screen widgets for player control:
- A compact 4x1 "Bar" widget.
- A 4x2 "Control" widget with extended controls (shuffle, repeat).
- A 2x2 "Grid" widget with a minimal, album-art-focused layout.
…olor mapping

- Changed theme fields in `PlayerInfo` for more specific control over widget element colors (surface container, title, artist, and playback controls).
- Enhance `MusicService` to support Android 12+ dynamic color schemes based on user preferences.
- Refactor `BarWidget4x1`, `ControlWidget4x2`, and `GridWidget2x2` to use the new specific color providers for improved visual consistency.
- Extracts common widget UI elements into `WidgetComponents.kt` and `WidgetUtils.kt`, including shared logic for album art caching and dynamic color providing.
- Implements dedicated XML layouts and vector drawables for high-fidelity widget previews in the system widget picker.
- Updates `BarWidget4x1`, `ControlWidget4x2`, and `GridWidget2x2` to use the new shared components and color mapping.
- Removes the old `PixelPlayGlanceWidgetReceiver` from the manifest.
- Updates `PreviousButton`, `NextButton`, and `PlayPauseButton` in `WidgetComponents.kt` to accept an `iconSize` parameter.
- Implements dynamic sizing for icons and album art in `GridWidget2x2.kt` based on the available widget dimensions.
@theovilardo
Copy link
Copy Markdown
Owner

Hi! This is actually pretty impressive and very similar to what I had in mind, I don't have much time to review full code but if these widgets do not replace the original I'll be approving this

@adlifarizi
Copy link
Copy Markdown
Contributor Author

Yes, I did not delete the original widget. I just removed the Receiver from AndroidManifest.xml, so if you want to keep the original widget, we can add it back to AndroidManifest.xml.

@theovilardo
Copy link
Copy Markdown
Owner

Yes, I did not delete the original widget. I just removed the Receiver from AndroidManifest.xml, so if you want to keep the original widget, we can add it back to AndroidManifest.xml.

That's perfect, we'll keep both, so the original remains on that adaptive layout and the new ones will add along

@adlifarizi
Copy link
Copy Markdown
Contributor Author

Sure, I'll make another commit to bring it back. Probably I'm gonna change the original widget description too to explain the adaptive capability

@theovilardo
Copy link
Copy Markdown
Owner

Lovely idea!

@adlifarizi
Copy link
Copy Markdown
Contributor Author

I've added it back, and should work fine since I don't change anything from original widget
image

@theovilardo
Copy link
Copy Markdown
Owner

Amazing! Merging now

@theovilardo theovilardo merged commit fafb6b7 into theovilardo:master Feb 20, 2026
@adlifarizi adlifarizi deleted the impl/widget-styles branch March 3, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants