change Drawable Color - Android Graphics

Android examples for Graphics:Drawable

Description

change Drawable Color

Demo Code


//package com.java2s;

import android.graphics.drawable.Drawable;

public class Main {
    public static Drawable changeDrawableColor(Drawable drawable,
            int destinationColor) {
        drawable.setColorFilter(destinationColor,
                android.graphics.PorterDuff.Mode.MULTIPLY);
        return drawable;
    }/*from www . ja  v  a 2  s . c  o m*/
}

Related Tutorials