How can I change the bottom border color for TextField when focus?


I have a simple TextField :

enter image description here

How can I change the blue color (programmatically) to another color , when textfield is in focused ?

I’ve already accomplished partial solution :

  var< TextField>("a");
  var drawable =; 
  drawable.setColorFilter(new Color("#b21755").android,; 

But When I navigate to another control , the red color remains :

When It’s in focus :

enter image description here

when It’s out of focus : (red remains — I don’t want that , I want the default color )

enter image description here

How can I make the color to back to its default color when moving out of focus ?


on lose focus, call clearColorFilter() .

Answered By – dashman

Answer Checked By – Timothy Miller (AngularFixing Admin)

Leave a Reply

Your email address will not be published.