If you think the Android project MagicViews listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package com.ivankocijan.magicviews.views;
//www.java2s.comimport android.content.Context;
import android.util.AttributeSet;
import android.widget.CheckedTextView;
import com.ivankocijan.magicviews.utils.FontUtils;
/**
* Created by ivankocijan on 19.05.2014..
*/publicclass MagicCheckedTextView extends CheckedTextView {
public MagicCheckedTextView (Context context) {
super(context);
}
public MagicCheckedTextView (Context context, AttributeSet attrs) {
super(context, attrs);
if (!isInEditMode()) {
init(context, attrs);
}
}
public MagicCheckedTextView (Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
if (!isInEditMode()) {
init(context, attrs);
}
}
privatevoid init (Context ctx, AttributeSet attrs) {
FontUtils.setTypeface(ctx, attrs, this);
}
}