I have been using the code below that I got from another question to split into two lines to edit the color programmatically.
Changing tint color of Android EditText programmatically
((EditText) row1.getVirtualChildAt(i))
The below code is what I'm using after the above line to change the color.
.getBackground().mutate().setColorFilter(getResources().getColor(R.color.Green), PorterDuff.Mode.SRC_ATOP);
Right now it sets the underline color so its always green whether or not the EditText box is being used.
How can I set it so it goes back to the default color after I click away from the EditText box. I would also be fine with specifying another color as the default like a light gray color.