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!