https://kotlinlang.org logo
#compose
Title
# compose
g

galex

08/01/2020, 6:54 AM
Wouuuahhhh you can’t set
.dp
on a
TextStyle
? Bold of Compose to fight directly the designers of the world 😂
Copy code
Text(
    text = "Save this dough recipe!",
    style = TextStyle(fontSize = 16.dp) // doesn't compile
)
😀 2
j

John O'Reilly

08/01/2020, 8:25 AM
looks like you have to use
.sp
g

galex

08/01/2020, 9:24 AM
Yes indeed, that’s the issue. I’ve had looooong debates with the designers in my company, and before that company too, about text that should be in SP. For their point of view, content has to adapt to changes of text sizes, but not navigation( (aka texts under main categories, etc).
c

caelum19

08/01/2020, 9:39 AM
CMV: Designers and front end devs should merge into 1 role 😛
😂 1
s

Sean McQuillan [G]

08/05/2020, 10:06 PM
You can convert any dimension into sp if you really need to, however it really should be sp if it's human-displayed text :).
4 Views