Skip to content

setting TextAppeareance in code #8

Open
@ismaelorenstein

Description

@ismaelorenstein

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions