List of usage examples for android.widget TextView getHintTextColors
public final ColorStateList getHintTextColors()
From source file:com.bt.download.android.gui.util.UIUtils.java
/** * Android devices with SDK below target=11 do not support textView.setAlpha(). * This is a work around. // w w w . j a v a 2 s. c om * @param v - the text view * @param alpha - a value from 0 to 255. (0=transparent, 255=fully visible) */ public static void setTextViewAlpha(TextView v, int alpha) { v.setTextColor(v.getTextColors().withAlpha(alpha)); v.setHintTextColor(v.getHintTextColors().withAlpha(alpha)); v.setLinkTextColor(v.getLinkTextColors().withAlpha(alpha)); Drawable[] compoundDrawables = v.getCompoundDrawables(); for (int i = 0; i < compoundDrawables.length; i++) { Drawable d = compoundDrawables[i]; if (d != null) { d.setAlpha(alpha); } } }