Back to project page ismartenit.
The source code is released under:
GNU General Public License
If you think the Android project ismartenit listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.smartenit.client.views; import android.content.Context; import android.graphics.Typeface; import android.util.AttributeSet; import android.widget.TextView; //from ww w.ja v a2 s .c om public class RobotoTextView extends TextView { public RobotoTextView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(); } public RobotoTextView(Context context, AttributeSet attrs) { super(context, attrs); init(); } public RobotoTextView(Context context) { super(context); init(); } public void init() { if(!isInEditMode()){ Typeface tf = Typeface.createFromAsset(getContext().getAssets(), "fonts/Roboto-Thin.ttf"); setTypeface(tf ,1); } } }