Java tutorial
//package com.java2s; //License from project: Apache License import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; public class Main { /** * Method to get a colored Drawable silhouette. * * @param sourceBitmap The original Bitmap. * @param color Color of the frame. * @return The colored Drawable silohuette. */ public static Drawable getSilhouetteWithColor(Drawable sourceBitmap, int color) { sourceBitmap.setColorFilter(color, PorterDuff.Mode.SRC_ATOP); return sourceBitmap; } }