3

enter image description hereHow to set the Leading-Icon in TextInputEditText of Material Design for Android? I only found how to set the Leading-Icon.

With drawableLeft the Icon is not centered vertically. Gravity has no effect.

M. Berg
  • 921
  • 2
  • 8
  • 11

1 Answers1

4

I found the solution for this problem. The Container TextInputLayout of TextInputEditText has a attribute called app:startIconDrawable where you can set the leading icon of the textfield. The attribute "drawableLeft" does not work if you use material design.

enter image description here

M. Berg
  • 921
  • 2
  • 8
  • 11