@@ -0,0 +1,2533 @@
+package com.drawablecolorchange;%0A%0Aimport android.content.Context;%0Aimport android.graphics.PorterDuff;%0Aimport android.graphics.PorterDuffColorFilter;%0Aimport android.graphics.drawable.Drawable;%0Aimport android.support.annotation.ColorInt;%0Aimport android.support.annotation.ColorRes;%0Aimport android.support.annotation.DrawableRes;%0Aimport android.support.v4.content.res.ResourcesCompat;%0A%0A/**%0A * Created by Mathiazhagan on 18-09-2016.%0A */%0Apublic class DrawableColorChange %7B%0A    Context context;%0A    Drawable drawable = null;%0A    Integer color = null;%0A%0A    public DrawableColorChange(Context context) %7B%0A        this.context = context;%0A    %7D%0A%0A    public void setDrawable(Drawable drawable) %7B%0A        this.drawable = drawable;%0A    %7D%0A%0A    public void setDrawable(@DrawableRes int drawableResId) %7B%0A        this.drawable = ResourcesCompat.getDrawable(context.getResources(), drawableResId, null);%0A    %7D%0A%0A    public void setColor(@ColorInt Integer color) %7B%0A        this.color = color;%0A    %7D%0A%0A    public void setColorResId(@ColorRes Integer colorResId) %7B%0A        if (colorResId != null) %7B%0A            this.color = ResourcesCompat.getColor(context.getResources(), colorResId, null);%0A        %7D%0A    %7D%0A%0A    public Drawable changeColor() %7B%0A        if (drawable == null) %7B%0A            throw null;%0A        %7D%0A        if (color == null) %7B%0A            throw null;%0A        %7D%0A        drawable.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));%0A        return drawable;%0A    %7D%0A%0A    public Drawable getColorChangeDrawable() %7B%0A        if (drawable == null) %7B%0A            throw null;%0A        %7D%0A        return drawable;%0A    %7D%0A%0A    public Drawable changeColorById(@DrawableRes Integer drawableResId, @ColorRes Integer colorResId) %7B%0A        setDrawable(drawableResId);%0A        if (colorResId != null)%0A            setColorResId(colorResId);%0A        return changeColor();%0A    %7D%0A%0A    public Drawable changeColorById(Drawable drawable, @ColorRes Integer colorResId) %7B%0A        setDrawable(drawable);%0A        if (colorResId != null)%0A            setColorResId(colorResId);%0A        return changeColor();%0A    %7D%0A%0A    public Drawable changeColorByColor(@DrawableRes Integer drawableResId, @ColorInt Integer color) %7B%0A        setDrawable(drawableResId);%0A        if (color != null)%0A            setColor(color);%0A        return changeColor();%0A    %7D%0A%0A    public Drawable changeColorByColor(Drawable drawable, @ColorInt Integer color) %7B%0A        setDrawable(drawable);%0A        if (color != null)%0A            setColor(color);%0A        return changeColor();%0A    %7D%0A%7D%0A

Create DrawableColorChange.java