set Bold font for TextView - Android User Interface

Android examples for User Interface:TextView Font

Description

set Bold font for TextView

Demo Code


//package com.java2s;
import android.text.TextPaint;
import android.widget.TextView;

public class Main {

    public static void setBold(TextView tv) {
        TextPaint tp = tv.getPaint();//from w ww .  j  ava 2s  . c o  m
        tp.setFakeBoldText(true);
    }
}

Related Tutorials