@Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);

        int contentWidth = mWidth - paddingLeft - paddingRight;
        int contentHeight = mHeight - paddingTop - paddingBottom;

        mCirclePaint.setStyle(Paint.Style.FILL);
        mCirclePaint.setColor(Color.RED);
        // Draw CircularViewObject
        mCircle.draw(canvas);
        // Draw non-highlighted Markers
        if (mMarkerList != null && !mMarkerList.isEmpty()) {
            for (final Marker marker : mMarkerList) {
                if (!mDrawHighlightedMarkerOnTop || !marker.equals(mHighlightedMarker)) {
                    marker.draw(canvas);
                }
            }
        }

        // Draw highlighted marker
        if (mDrawHighlightedMarkerOnTop && mHighlightedMarker != null) {
            mHighlightedMarker.draw(canvas);
        }

        // Draw line
        if (mIsAnimating) {
            final float radiusFromCenter = mCircle.getRadius() + CIRCLE_TO_MARKER_PADDING + BASE_MARKER_RADIUS;
            final float x = (float) Math.cos(Math.toRadians(mHighlightedDegree)) * radiusFromCenter + mCircle.getX();
            final float y = (float) Math.sin(Math.toRadians(mHighlightedDegree)) * radiusFromCenter + mCircle.getY();
            canvas.drawLine(mCircle.getX(), mCircle.getY(), x, y, mCirclePaint);
        }


        // Draw the text.
        if (!TextUtils.isEmpty(mText)) {
            canvas.drawText(mText,
                    mCircle.getX() - mTextWidth / 2f,
                    mCircle.getY() - mTextHeight / 2f,
//                paddingLeft + (contentWidth - mTextWidth) / 2,
//                paddingTop + (contentHeight + mTextHeight) / 2,
                    mTextPaint);
        }
    }
@ Override protected void onDraw ( Canvas canvas ) { super . onDraw ( canvas ) ; int contentWidth = mWidth - paddingLeft - paddingRight ; int contentHeight = mHeight - paddingTop - paddingBottom ; mCirclePaint . setStyle ( Paint . Style . FILL ) ; mCirclePaint . setColor ( Color . RED ) ; mCircle . draw ( canvas ) ; if ( mMarkerList != null && ! mMarkerList . isEmpty ( ) ) { for ( final Marker marker : mMarkerList ) { if ( ! mDrawHighlightedMarkerOnTop || ! marker . equals ( mHighlightedMarker ) ) { marker . draw ( canvas ) ; } } } if ( mDrawHighlightedMarkerOnTop && mHighlightedMarker != null ) { mHighlightedMarker . draw ( canvas ) ; } if ( mIsAnimating ) { final float radiusFromCenter = mCircle . getRadius ( ) + CIRCLE_TO_MARKER_PADDING + BASE_MARKER_RADIUS ; final float x = ( float ) Math . cos ( Math . toRadians ( mHighlightedDegree ) ) * radiusFromCenter + mCircle . getX ( ) ; final float y = ( float ) Math . sin ( Math . toRadians ( mHighlightedDegree ) ) * radiusFromCenter + mCircle . getY ( ) ; canvas . drawLine ( mCircle . getX ( ) , mCircle . getY ( ) , x , y , mCirclePaint ) ; } if ( ! TextUtils . isEmpty ( mText ) ) { canvas . drawText ( mText , mCircle . getX ( ) - mTextWidth / 2f , mCircle . getY ( ) - mTextHeight / 2f , mTextPaint ) ; } }
TODO always draw the animating markers on top.