Android custom view : draw over toolbar when fragment replaced with animation

790 views Asked by At

I created a custom view which draw a quarter circle :

public class QuarterCircle extends View {
    ...
    @Override
    protected void onDraw(Canvas canvas) {
        canvas.clipRect(mRectClip, Region.Op.REPLACE);
        canvas.rotate(mRotation, mRectClip.right / 2, mRectClip.bottom / 2);
        canvas.drawArc(mRect, 0, 360, false, mPaint);
    }
    ...
}

It looks like that :

When I change fragment with an animation (exit to top), tge view draw over toolbar in a weird way :

On emulator and some devices, it looks like this. On some other devices, it's cleared after animation stops.

Any clue of what going wrong ?

Thanks, Anthony

0

There are 0 answers