Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setting TextAppeareance in code #8

Open
ismaelorenstein opened this issue Jan 4, 2014 · 0 comments
Open

setting TextAppeareance in code #8

ismaelorenstein opened this issue Jan 4, 2014 · 0 comments

Comments

@ismaelorenstein
Copy link

If we define a style in xml and want to apply it at RunTime using setTextAppearance, the MagicTextView specific format is not loaded. Adding this to code solved it:

public void setTextAppearance(Context context, int resid) {
super.setTextAppearance(context, resid);
TypedArray a = context.obtainStyledAttributes(resid, R.styleable.MagicTextView);
formatMagicTextView(a);
a.recycle();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant