snippet

作者: xiaoluo | 来源:发表于2022-08-02 21:19 被阅读0次
    @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);

相关文章

网友评论

      本文标题:snippet

      本文链接:https://www.haomeiwen.com/subject/oabjwrtx.html