Material-components-android: Question: TextInputLayout startIcon support. How to set padding between the icon and text?

Created on 16 May 2019  路  8Comments  路  Source: material-components/material-components-android

There is a new option in this component: startIcon.
How to set paddings to it? Like android:drawablePadding.
The question is for both startIcon and endIcon.

feature request

Most helpful comment

please offer a attribute like 'endIconPadding(Left銆丷ight銆乀op銆丅ottom...)'

All 8 comments

Setting android:drawablePadding on the TextInputEditText wrapped by the TextInputLayout should work as expected. Does it not work for you?

When passwordToggleEnabled="true" the padding on TextInputEditText does not work.
image

I wish I could show this icon closer to the bottom line and avoid text to overlay the icon.

We've recently made several changes to TextInputLayot. If this is still an issue, please reopen.

It's still an issue. How do I set padding on the start/end icon? @ldjcmu

Still an issue, also when you want to remove the padding start/end from the EditText the issue manifests itself in a different form, at this time adding extra padding to the start/end again.

image

please offer a attribute like 'endIconPadding(Left銆丷ight銆乀op銆丅ottom...)'

Has this issue been resolved??

you can set like android:drawablePadding="-15dp"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TdevM picture TdevM  路  3Comments

zkovar picture zkovar  路  3Comments

JavierSegoviaCordoba picture JavierSegoviaCordoba  路  3Comments

danielwilson1702 picture danielwilson1702  路  3Comments

ahmaducg picture ahmaducg  路  3Comments