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

Manojna Chintapalli

06/17/2022, 6:22 PM
Hello! Does anyone have a good example for aligning TextField label and the line (underline) properly? There seems to be some gap between their starting points. Thanks in advance!
c

Colton Idle

06/17/2022, 7:19 PM
Are you asking about the fact that the label is inset a bit from the start? I think that's there because of the fact that a textField has a background, and so having that padding there makes sense. When you change the background of the test field to transparent (a la trying to recreate "old" material design input fields) then yeah you have a weird inset. It was posted in this slack like 100 times already and the material teams response was "we dont currently support the old style material inputs in compose"
BUT I think there was an update sorta recently (in 1.2 of compose?) that exposes some additional padding you can override. let me try to find it.
i wonder if this is it. @Louis Pullen-Freilich [G] (sorry for the ping but you were in the other threads about this) might be able to give you a canonical answer.
l

Louis Pullen-Freilich [G]

06/17/2022, 7:30 PM
You can change the paddings now, yes, but the components are implemented to the Material 2 specs, so there’s no out of the box flag to change the appearance to match an older component
❤️ 1
2 Views