snippet

2022-08-02  本文已影响0人  xiaoluo
    @Override
    protected void onDraw(Canvas canvas) {
        // Translate rotation axe to the center.
        canvas.translate(canvas.getWidth()/2, canvas.getHeight()/2);
        // Rotate!
        canvas.rotate(rotation(3));
        // Put back to its original place.
        canvas.translate(-canvas.getWidth()/2, -canvas.getHeight()/2);
        // Invalidate the view.
        postInvalidateOnAnimation();
        super.onDraw(canvas);
    }
view.postOnAnimation(runnable);
上一篇 下一篇

猜你喜欢

热点阅读