Code example for TextPaint

Methods: getTypefacesetTypeface

0
     *  
     * @attr ref android.R.styleable#TextView_typeface 
     * @attr ref android.R.styleable#TextView_textStyle 
     */ 
    public void setSwitchTypeface(Typeface tf) {
        if (mTextPaint.getTypeface() != tf) {
            mTextPaint.setTypeface(tf);
 
            requestLayout();
            invalidate();
        } 
    } 
 
    /** 
     * Returns the text displayed when the button is in the checked state. 
     */ 
    public CharSequence getTextOn() {
        return mTextOn;
    } 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE