package com.algobase.share.widgets; import android.content.Context; import android.widget.TextView; import android.graphics.Typeface; import android.util.AttributeSet; public class FontTextView extends TextView { String fn = "Roboto-Light"; public FontTextView(Context c) { super(c); initialize(c); } public FontTextView(Context c, AttributeSet a) { super(c,a); initialize(c); } public FontTextView(Context c, AttributeSet a, int i) { super(c,a,i); initialize(c); } void initialize(Context context) { Typeface tf = Typeface.createFromAsset(context.getAssets(), fn); setTypeface(tf); } }