I found various answers on how to change the line color of an EditText in Android programatically. Right now I'm using this solution:
final Drawable originalDrawable = editText.getBackground();
final Drawable wrappedDrawable = DrawableCompat.wrap(originalDrawable);
DrawableCompat.setTintList(wrappedDrawable, ColorStateList.valueOf(darkVibrantColor));
editText.setBackground(wrappedDrawable);
This does in fact change to color of an EditText, but unfortunately it does not only change the line color of the specific EditText I'm using but the line color of all EditTexts used in my application. Event if they are in different activities.
How do I change the line color of just one specific EditText without changing the line color globally? Thanks.
Update: I cannot use a predefined style as the color is generated dynamically while the application is running.