android - Changing the background color of an EditText issue -


I have a simple layout with an edittext.

When I edit = "@ + id / at" Android: layout_width = "match_parent" Android: layout_height = "wrap_content" Android: layout_margin top =

  "5 DP" Android: background = "@ Android: Color / White" />  

Then there is a strange thing when the focus is on the art, the layout (!) Has the background color of the layout.

I have to change the background color dynamically, and after the call I have only one result:

  subject.setBackgroundColor (Color.parseColor (mycolor)) ;  

I have also tried the following method:

  theme .Setbackground (new color diary (Color Piececoller (Mycolor)));  

The result was the same.

Actually I want to change the color of the background of an edit in sequence.

Put a basic layout to keep the background in the solution and set the EditText To clear the background.

I do not like that solution, but it works. Android: background = "@ Android: Color / White" & gt; EditText Android: id = "@ + id / et" android: layout_width = "match_parent" Android:


Comments