StickerView
StickerView copied to clipboard
unable to change color of stikcer view with setColorFilter
i'am not sure why setColorFilter is not working at all on stikcers .. can any body help me please
You can't do it directly (Add color programmatically)
================================================
private void changeBitmapColor(Bitmap sourceBitmap, String color) {
Bitmap resultBitmap = Bitmap.createBitmap(sourceBitmap, 0, 0,
sourceBitmap.getWidth() - 1, sourceBitmap.getHeight() - 1);
Paint p = new Paint();
ColorFilter filter = new LightingColorFilter(Color.parseColor(color), 1);
p.setColorFilter(filter);
mCurrentView.setBitmap(resultBitmap);
Canvas canvas = new Canvas(resultBitmap);
canvas.drawBitmap(resultBitmap, 0, 0, p);
}