Created
January 31, 2013 23:25
-
-
Save pwittchen/4687667 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyEditText extends EditText{ | |
public MyEditView(Context context, AttributeSet attrs, int defStyle) { | |
super(context, attrs, defStyle); | |
init(); | |
} | |
public MyEditView(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
init(); | |
} | |
public MyEditView(Context context) { | |
super(context); | |
init(); | |
} | |
private void init() { | |
if (!isInEditMode()) { | |
Typeface tf = Typeface.createFromAsset(getContext().getAssets(), "font.ttf"); | |
setTypeface(tf); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment