dkmeteor/Bubble-Notification

Crash after drag

Closed this issue · 1 comments

public void finish(View target, float x, float y) {
            double distance = Math.sqrt(Math.pow(mBaseX - mTargetX, 2)
                            + Math.pow(mBaseY - mTargetY, 2));
            clearDatas();
            Canvas canvas = getHolder().lockCanvas();
            canvas.drawColor(Color.TRANSPARENT, Mode.CLEAR);

NullPointException on the last line.

Device : 华为荣耀六

I can't reappear on my device(小米1).
I will add some check for SurfaceView.

Can't reappear.