I've got a class which extends LinearLayout, can't figure out how to get PorterDuff.Mode working with this piece of code:
this.getBackground().setColorFilter(Color.parseColor("#a7d2e3"), PorterDuff.Mode.DARKEN);
"PorterDuff cannot be resolved to a variable"
I've imported porterduff and from what I can see PorterDuff is a static class. Any ideas?
Add this to your imports, because for some reason, Eclipse doesn't automatically do it for this one:
import android.graphics.PorterDuff;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With