Drawable setColorFilter not work on Nexus 7

682 Views Asked by At

I want to change color of android design drawable to blue. This is piece of my code in application class onCreate method:

Drawable drawable = getResources().getDrawable(R.drawable.rating_not_important);
drawable.setColorFilter(0xff1565c0, Mode.SRC_ATOP);
drawable = getResources().getDrawable(R.drawable.rating_important);
drawable.setColorFilter(0xff1565c0, Mode.SRC_ATOP);    

It works on emulator (API 4.0.3) and a Xperia P mobile device (API 4.1.2), but not work on Nexus 7 tablet. Star drawable has its default white color with no change.I have tested Mode.MULTIPLY and Mode.LIGHTEN and no success. Please help!

0

There are 0 best solutions below