Back to project page RobotoViews.
The source code is released under:
Apache License
If you think the Android project RobotoViews 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.pjcorp.robotoview.view; //w ww . j a v a 2 s .com import android.content.Context; import android.graphics.Typeface; import android.util.AttributeSet; import com.pjcorp.robotoview.utils.TypefaceManager; /** * Re write CheckedTextView class integrating Roboto font */ public class CheckedTextView extends android.widget.CheckedTextView { public CheckedTextView(Context context) { super(context); } public CheckedTextView(Context context, AttributeSet attrs) { super(context, attrs); onInitTypeface(context, attrs, 0); } public CheckedTextView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); onInitTypeface(context, attrs, defStyle); } protected void onInitTypeface(Context context, AttributeSet attrs, int defStyle){ if(attrs != null){ Typeface typeface = TypefaceManager.getTypeface(context, attrs, defStyle); if(typeface != null){ setTypeface(typeface, 0); } } } }