Is there any way to highlight tab icon image programmatically without using separate drawable resource?
I tried using PorterDuffColorFilter but it doesn’t look good:
// apply a color mask to the icon to mark it as selected
int selectedIconMaskColor = view.getResources().getColor(R.color.tab_icon_selected);
PorterDuffColorFilter selectedIconFilter = new PorterDuffColorFilter(selectedIconMaskColor,
PorterDuff.Mode.SRC_ATOP);
copyIconDrawable.setColorFilter(selectedIconFilter);
Are there any other alternatives?
I ended up using simple image manipulation class: