I have an editText and i want to set its background color to red like this:
RegistrationCountry.setBackgroundColor(Color.RED);
Now i yould
If you just want to highlight the EditText object, you can use PorterDuff instead: http://developer.android.com/reference/android/graphics/PorterDuff.Mode.html.
To set the color:
RegistrationCountry.getBackground().setColorFilter(Color.RED, PorterDuff.Mode.SRC_IN);
To remove the color:
RegistrationCountry.getBackground().clearColorFilter();