Skip to content
This repository has been archived by the owner on Mar 30, 2020. It is now read-only.

Support for retrieving attributes just from context #19

Closed
ZacSweers opened this issue Jul 11, 2015 · 1 comment
Closed

Support for retrieving attributes just from context #19

ZacSweers opened this issue Jul 11, 2015 · 1 comment
Labels
Milestone

Comments

@ZacSweers
Copy link
Owner

Would need another overload for Style, and remove the hard requirement for attributeset not to be null in the generated Barbershop#style(...) method.

private static final int[] ATTRS = new int[]{
        android.R.attr.listDivider
};

// Want to do this boilerplate
final TypedArray a = context.obtainStyledAttributes(ATTRS);
mDivider = a.getDrawable(0);
a.recycle();

// Probable method signature
style(Object target, int[] attrs);
@ZacSweers
Copy link
Owner Author

Closed since it kind of just falls under #19

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

No branches or pull requests

1 participant