How to use DynamicColors in my android app on kotlin?

23 Views Asked by At

Good afternoon, dear forum users, I ask for your help with Material 3 Dynamic Color. I wrote a simple application (I'm still weak in skills) and I'm trying to make the color of the buttons in my application selected from my phone's wallpaper, that is, use DynamicColor.

https://m3.material.io/styles/color/dynamic/user-generated-source

I have added the latest version material implementation("com.google.android.material:material:1.12.0-alpha03")

Activate DynamicColor DynamicColors.applyToActivitiesIfAvailable(application)

What else and where should I add? I've read a lot of instructions, but I still can't master this MonetUI

0

There are 0 best solutions below