Code example for BitmapDrawable

Methods: setColorFilter

0
 
  @Override public void setColorFilter(ColorFilter cf) {
    if (placeholder != null) {
      placeholder.setColorFilter(cf);
    } 
    image.setColorFilter(cf);
  } 
 
  @Override public int getOpacity() { 
    return image.getOpacity();
  } 
 
  @Override protected void onBoundsChange(Rect bounds) {
    super.onBoundsChange(bounds);
 
    image.setBounds(bounds);
    if (placeholder != null) {
      // Center placeholder inside the image bounds 
      setBounds(placeholder);
    } 
  }