Reputation: 5353
I just want to create drawable using color.
so i use this method Drawable background = Drawable.setColorFilter( 0xffff0000, PorterDuff.Mode.MULTIPLY );
here is my full code
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.taketestactivity);
Drawable background = Drawable.setColorFilter( 0xffff0000, PorterDuff.Mode.MULTIPLY );
}
Upvotes: 0
Views: 86
Reputation: 31
setColorFilter is a method of the Drawable class. So after you declare background as a Drawable, then you can write:
background.setColorFilter( 0xffff0000, PorterDuff.Mode.MULTIPLY );
Upvotes: 1