Code example for TextPaint

Methods: setAntiAlias, setColor, setTextAlign, setTextSize

0
 
        mBreakerExpanded = new LineBreaker();
        mBreakerCollapsed = new LineBreaker();
 
        // Default font size and color. 
        mTextPaint = new TextPaint();
        mTextPaint.setAntiAlias(true);
        mTextPaint.setTextSize(13);
        mTextPaint.setColor(0xFF000000);
        mTextPaint.setTextAlign(Align.LEFT);
    } 
 
    @Override 
    protected void drawableStateChanged() { 
        super.drawableStateChanged(); 
        if (mTextColor != null && mTextColor.isStateful()) {
            updateTextColors(); 
        } 
    } 
 
    /**