Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class TextAwesome extends TextView {
- private static Typeface mTypeface;
- public TextAwesome(final Context context) {
- this(context, null);
- }
- public TextAwesome(final Context context, final AttributeSet attrs) {
- this(context, attrs, 0);
- }
- public TextAwesome(final Context context, final AttributeSet attrs, final int defStyle) {
- super(context, attrs, defStyle);
- if (mTypeface == null) {
- mTypeface = Typeface.createFromAsset(context.getAssets(), "city_flow.ttf");
- }
- setTypeface(mTypeface);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement