Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Made the player screen background dynamic #520

Merged
merged 3 commits into from
Jan 11, 2025

Conversation

GautamCoder4019k
Copy link
Contributor

This pull request includes several changes to improve the appearance and functionality of the BrainzPlayer UI by introducing dynamic background colors and enhancing the TopBar component. The most important changes include adding dynamic background color functionality to the player screen, updating the TopBar to accept a customizable background color, and integrating the BrainzPlayerViewModel to manage these changes.

Dynamic Background Color Functionality:

  • Introduced dynamic background color and brush to the player screen and modified AlbumArtViewPager to use the dynamic background color.

TopBar Customization:

  • Added a backgroundColor parameter to the TopBar component to allow customizable background colors.

ViewModel Integration:

  • Added methods to the BrainzPlayerViewModel to compute and store the dominant color from the album art. This color is then used as the dynamic background color for the player screen.

MainActivity Updates:

*Integrated BrainzPlayerViewModel to manage the dynamic background color and updated the Scaffold in MainActivity to use this color.

These changes collectively enhance the user experience by providing a visually dynamic and customizable interface for the BrainzPlayer.

Screenshots

1. Add fallback swatches
2. Better animation for background
@07jasjeet
Copy link
Collaborator

Hi @GautamCoder4019k, Thanks for changes. I took some liberty to improve the feature and fix a few bugs here and there. You can go through this commit for what has been changed. Overall this looks like a nice addition.

@07jasjeet 07jasjeet merged commit d44ae75 into metabrainz:main Jan 11, 2025
1 check passed
@GautamCoder4019k
Copy link
Contributor Author

Hi @07jasjeet , Thanks for improving the commit, I learned some valuable approaches from your changes that I’ll use going forward.

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