Android-Image-Animator-Frame-Library icon indicating copy to clipboard operation
Android-Image-Animator-Frame-Library copied to clipboard

SetColorFilter

Open Anth06ny opened this issue 9 years ago • 0 comments

Hi,

I add this to your library in FrameImageAnimator to add ColorFilter on the animation

Paint paint = null;

/**
 * Add Color Filter
 * @param colorId
 */
public void setFrameImageAnimatorColorFilter(int colorId) {
    paint =  new Paint();
    paint.setColorFilter(new PorterDuffColorFilter(colorId, PorterDuff.Mode.MULTIPLY));
}

and in onDraw method x2 c.drawBitmap(mBitmapList.get(playedSprintCount), 0, 0, paint);

Anth06ny avatar Dec 04 '14 11:12 Anth06ny