Is there anything like `expandedHintEnabled=false`...
# compose
e
Is there anything like
expandedHintEnabled=false
from
TextInputLayout
for a
TextField
?
c
I think what you're looking for is placeholder? https://cs.android.com/androidx/platform/tools/dokka-devsite-plugin/+/master:testDat[…]mples/TextFieldSamples.kt;l=96?q=textfield%20compose%20sample Basically, in compose there is label that is a hint, and then floats up to a label. and you can optionally supply a placeholder which will also stay there as a hint when the label is in place.
e
I'm looking for the opposite. Essentially, I want the label to always be "floated up"
c
I wonder if you set placeholder to just a blank string, and set label to text if that would work.
e
placeholder
is a composable function so it can't just be set to blank.
c
Can you set it to Text("") though?
e
Yes, but that doesn't change anything; now there's a
Text
there that happens to not have any text in it
c
sorry. guess i was wrong with my hypothesis of using those two fields.
e
Thanks anyways 😄