https://kotlinlang.org logo
Title
c

Colton Idle

04/20/2021, 7:34 PM
Didn't see this here and thought it was cool https://github.com/supertechninja/Jetpack-Compose-Theme-Configurator
🤩 5
c

Chris Sinco [G]

04/20/2021, 7:38 PM
Very cool - we’ve had a Material theme generating tool on the backlog for sometime for Android Studio, so this would be nice to see how it’s used by developers.
c

Colton Idle

04/20/2021, 7:39 PM
Very interested in that ^ I still think the main thing for me is being able to see my color choices and how they affect all of the components. I tried the web thing (glitch?) once and found it hard to use.
c

Chris Sinco [G]

04/20/2021, 7:52 PM
For sure - and it’s really for web and doesn’t map exactly to MDC-Android or Compose Material. 😞
👍 1
and how they affect all of the components
Exactly! This is from early explorations we have - might dust these off and revisit after Arctic Fox 😉
👍 1
Originally we just had the Material stickersheet, but we realized the other important piece is understanding how the theme can affect all Composables in a project/module
c

Colton Idle

04/20/2021, 7:58 PM
Ahhh yeah. That's like exactly what I would find super helpful. My design team is weird where our colors don't really line up with the whole "primary", "secondary", "variant", etc sort of stuff so we're constantly creating new styles (themes?) to style something as simple as a checkbox. SO for example, if we want purple checkboxes and blue checkboxes, in compose, we've just been creating PurpleCheckBoxTheme that is just material colors.copy() and we swap the secondary color, same for BlueCheckBoxTheme, and then we just have PurpleCheckboxComposable() and BlueCheckboxComposable()
👍 1
@Joshua McWilliams are you the author of the repo?
j

Joshua McWilliams

04/20/2021, 8:26 PM
Yes!
c

Chris Sinco [G]

04/21/2021, 3:43 AM
Yeah the Material theming is a bit challenging on scale for how it maps to the many colors that designers and developers use. I think creating different “themes” copying off MaterialTheme is one approach. The Jetsnack sample on GitHub has even more complexity in it that shows what is possible.
c

Colton Idle

04/21/2021, 9:37 AM
Yeah, I've copied my base immpl from jetsnack 😄 but I still find myself creating the one off themes to make sure that my material checkboxes are colored/styled correctly.
c

Chris Sinco [G]

04/21/2021, 7:49 PM
True - I think I’ve also seen others write extension functions of
Colors
for one off theme keys
1