aboutsummaryrefslogtreecommitdiff
path: root/WordPress/src/main/java/org/wordpress/android/widgets/NoticonTextView.java
blob: f6255692c751ece6aa0b852f750f89fac7b3a20e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package org.wordpress.android.widgets;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.TextView;

/**
 * TextView that uses noticon icon font
 */
public class NoticonTextView extends TextView {
    private static final String NOTICON_FONT_NAME = "Noticons.ttf";

    public NoticonTextView(Context context) {
        super(context, null);
        this.setTypeface(TypefaceCache.getTypefaceForTypefaceName(context, NOTICON_FONT_NAME));
    }

    public NoticonTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
        this.setTypeface(TypefaceCache.getTypefaceForTypefaceName(context, NOTICON_FONT_NAME));
    }

    public NoticonTextView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        this.setTypeface(TypefaceCache.getTypefaceForTypefaceName(context, NOTICON_FONT_NAME));
    }
}