Android examples for User Interface:EditText
set Underline Color for EditText
//package com.java2s; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.widget.EditText; public class Main { public static void setUnderlineColor(final EditText editText, final int color) { Drawable drawable = editText.getBackground(); drawable.setColorFilter(color, PorterDuff.Mode.SRC_ATOP); }// w w w . ja v a2 s . co m }