Original for Android

how can i recolor underline EditText in android 5.0 (Material)? It looks gray, but I want it to be blue, how can I archive this?

+4
source share
2 answers

You must set the theme of this line in your application:

    <item name="android:colorControlActivated">#123490</item>

(or colorAccentfor a wider range of coloring)

more about the new XML properties xml params HERE . you must also define colorPrimaryandcolorPrimaryDark

+3
source

To do this programmatically:   editText.getBackground().setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_ATOP);

+3
source

All Articles