MagicTextView icon indicating copy to clipboard operation
MagicTextView copied to clipboard

setting TextAppeareance in code

Open ismaelorenstein opened this issue 11 years ago • 0 comments

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(); }

ismaelorenstein avatar Jan 04 '14 20:01 ismaelorenstein