godaddy / compose-color-picker

Jetpack Compose Android Color Picker 🎨
MIT License
369 stars 23 forks source link

Use within Dialog #21

Closed Jawnnypoo closed 2 years ago

Jawnnypoo commented 2 years ago

Hey folks,

I have tried using this within both Dialog and AlertDialog, and it looks like as soon as the screen is touched in any way, the dialog gets dismissed. I have tried setting dismissOnClickOutside = false in the DialogProperties but this did not solve the issue either. Do you guys have a sample of how to get this to work within the context of a dialog?

Jawnnypoo commented 2 years ago

I created a sample using an AlertDialog here: https://github.com/godaddy/compose-color-picker/pull/22

It actually works just fine in this repo, so I am going to have to go and look into why it isn't work in my app.

Jawnnypoo commented 2 years ago

This is kind of embarrassing. I was telling my dialog to dismiss in the onColorChanged callback, which was being called as soon as I tapped on the color wheel. Sorry for the trouble.