Back to project page Llama.
The source code is released under:
MIT License
If you think the Android project Llama 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 io.github.nick11roberts.llamaspawningbuttonthing; /* w w w. ja va 2 s . co m*/ import android.content.Context; import android.content.res.TypedArray; import android.graphics.Typeface; import android.util.AttributeSet; import android.widget.TextView; public class CustomTypefaceTextView extends TextView { public CustomTypefaceTextView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(attrs); } public CustomTypefaceTextView(Context context, AttributeSet attrs) { super(context, attrs); init(attrs); } public CustomTypefaceTextView(Context context) { super(context); init(null); } private void init(AttributeSet attrs) { if (attrs!=null) { Typeface myTypeface = Typeface.createFromAsset(getContext().getAssets(), "fonts/Fipps-Regular.otf"); setTypeface(myTypeface); } } }