Java Code Examples for android.widget.TextView.getPaintFlags()

The following are Jave code examples for showing how to use getPaintFlags() of the android.widget.TextView class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: MyLife   File:   Vote up 5 votes
public static void setBold(TextView textView, boolean work) {
    int flags = textView.getPaintFlags();
    if (work) {
        textView.setPaintFlags(flags | Paint.FAKE_BOLD_TEXT_FLAG);
    } else {
        textView.setPaintFlags(flags | ~Paint.FAKE_BOLD_TEXT_FLAG);
Example 2
Project: GitHub   File:   Vote up 4 votes
public final void setTypeface(TextView target, Typeface t) {
    if (t == null) return;
    int flags = target.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG;