Skip to content

Instantly share code, notes, and snippets.

@ifucolo
Created January 28, 2017 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ifucolo/cfcecccdb87734f19bab7eeea2cdbf4a to your computer and use it in GitHub Desktop.
Save ifucolo/cfcecccdb87734f19bab7eeea2cdbf4a to your computer and use it in GitHub Desktop.
public class CustomEditText extends EditText {
public CustomEditText(Context context) {
super(context);
}
public CustomEditText(Context context, AttributeSet attrs) {
super(context, attrs);
Util.setCustomFont(this,context,attrs,
R.styleable.CustomTextView,
R.styleable.CustomTextView_font);
}
public CustomEditText(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
Util.setCustomFont(this,context,attrs,
R.styleable.CustomTextView,
R.styleable.CustomTextView_font);
}
public void setFont(String font) {
Util.setCustomFont(this, getContext(), font);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment