一段代码证明18ms的刷新间隔

    @Override
    public void draw(Canvas canvas) {
        super.draw(canvas);
        Log.e("xie", "draw..");
        startPos++;
        if (startPos == getWidth() - 30) {
            startPos = 0;
        }
        Paint paint = new Paint();
        paint.setColor(0xffff0000);
        canvas.drawRect(startPos, 0, startPos + 30, 20, paint);
        invalidate();
    }

你可能感兴趣的:(一段代码证明18ms的刷新间隔)