Advertisement
Guest User

Untitled

a guest
Dec 16th, 2016
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. public class TextAwesome extends TextView {
  2.     private static Typeface mTypeface;
  3.  
  4.     public TextAwesome(final Context context) {
  5.         this(context, null);
  6.     }
  7.  
  8.     public TextAwesome(final Context context, final AttributeSet attrs) {
  9.         this(context, attrs, 0);
  10.     }
  11.  
  12.     public TextAwesome(final Context context, final AttributeSet attrs, final int defStyle) {
  13.         super(context, attrs, defStyle);
  14.  
  15.         if (mTypeface == null) {
  16.             mTypeface = Typeface.createFromAsset(context.getAssets(), "city_flow.ttf");
  17.         }
  18.         setTypeface(mTypeface);
  19.     }
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement