André Thiele

    André Thiele

    1 year ago
    How can I remove this padding from the Outlined Text Field that is reserved to the label if I dont want to show a label? Or should I wrap it and clip its contents?
    Colton Idle

    Colton Idle

    1 year ago
    n

    nglauber

    1 year ago
    @Colton Idle here we are again 😄 I’ll add a reference to the last time people ask this question, so we can do a stack trace 😅 https://kotlinlang.slack.com/archives/CJLTWPH7S/p1622729349245100
    André Thiele

    André Thiele

    1 year ago
    @nglauber yea thanks, the background is only for you to see that theres a padding applied!
    n

    nglauber

    1 year ago
    Yeah… The padding will still be there 😕 I had a long discussion regarding this padding “issue” in TextField… If you want that for now, you must have to copy the
    OutlinedTextField
    implementation and remove the padding… 🤷‍♂️ It’s not so complicated actually, but Compose does not currently provide this right now.
    André Thiele

    André Thiele

    1 year ago
    okay, will just live with it for now and. Actually I just apply top padding to other components so they are centered vertically
    Colton Idle

    Colton Idle

    1 year ago
    If anyone creates a gist for something that allows customizing padding, please share. 😄
    n

    nglauber

    1 year ago
    @Colton Idle I did one to remove that horizontal padding from TextField… Basically I copied the
    TextField.kt
    and
    TextFieldImpl.kt
    and did my changes… 🤷‍♂️
    But I have to say that it was very easy to do… Google, please add a single param:
    horizontalMargin
    and boom: everything works and we stop to see “how can I removed the padding from TextField?” 😄
    André Thiele

    André Thiele

    1 year ago
    After some thinking I really think this is a bug, if your lambda is empty or not provided, it should be rendered without a padding this could easily be done by overloading
    Colton Idle

    Colton Idle

    7 months ago
    n

    nglauber

    7 months ago
    You’re welcome 😄
    This one was also fixed… 🙂 https://issuetracker.google.com/issues/187746439