I am trying Jetpack Compose and I have tons of que...
# compose
v
I am trying Jetpack Compose and I have tons of questions and bugreports πŸ™‚ What is the idiomatic way of having the colored background? Just Surface with color property?
a
m
um, there is a login page
g
This is public tracker, but you should login with Google Account
m
screw it, where's GitHub OAuth?
πŸ‘ 1
πŸ‘€ 1
a
Surface with a color param is a way to have a background right now, yes
v
Thanks Andrey. I would suggest to have for each control as it's done in native android widgets. And In React Native.
πŸ‘Ž 3
😒 1
a
Surface also has a shape and will eventually have a shadow. there is also a ColoredRect component available for simpler use cases
v
Thanks for the ColoredRect. I mean imaging you need to add a background color to a Text: wrapping it in a component looks like overkill, having a parameter on Text itself would be much more readable.
a
but way less composable. you can't have a background color param on every widget without all the widgets having too many of the parameters, like in current Views. so instead you have simple one purpose components and combine them
βž• 6
πŸ‘ 7
t
@Vladimir Ivanov The idea of Compose is to be … Composable. Any feature must pass this test. And if you think that Text with ColoredRect is overkill, you can always compose a one that does all of the stuff at once
πŸ‘πŸ» 2
πŸ˜„ 1
πŸ‘ 1
v
Hm, fair enough!