I'm using custom Drawable with animation to draw function diagram...
and I use PorterDuff.Mode.SRC_IN PorterDuffXfermode to draw its brightness bar (to clear the overlaped track)
with no overscroll effect, the brightness bar thumb is well drawn.
but if overscroll when animating, the thumb turn white.
pseudocode....
public class NotificationTileDrawable extends Drawable {
PorterDuffXfermode xfer = new PorterDuffXfermode(PorterDuff.Mode.SRC_IN);
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.DITHER_FLAG);
//...
@Override
public void draw(Canvas canvas) {
//draw other...
//draw track
canvas.drawRoundRect(...);
paint.setXfermode(xfer);
//draw thumb
canvas.drawRoundRect(...);
paint.setXfermode(null);
//draw other...
}
//other abstract methods...
}
how should i do to fix this? (without disable overscroll effect)
Thx