I am trying to set icon of selected color to a preference:
Preference prf = (Preference) findPreference(\"SelectColorPref\");
prf.setIcon
the easiest way using ShapeDrawable
ShapeDrawable sdrawable = new ShapeDrawable(new RectShape()); sdrawable.paint.Color = color.RED; sdrawable.setIntrinsicWidth(10); sdrawable.setIntrinsicHeight(40);