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


I have a simple TextField :


How can I change (programmatically) the blue color to another color , when focus ?

I’ve already managed to change the overall background color via :
      .getViewById< TextField>("a")
      .setBackgroundColor(new Color("#b21755")

but it changes (obviously) all the background color. I want only the bottom border - when focus.


Here you go


Thanks for the response:)

…(not declarative)


Partial solution :

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

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

When It’s in focus :


when It’s out of focus : (red remains)


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