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

Feature Request: Annotation for binding array resources #300

Closed
tpfaff opened this issue Jul 7, 2015 · 7 comments
Closed

Feature Request: Annotation for binding array resources #300

tpfaff opened this issue Jul 7, 2015 · 7 comments

Comments

@tpfaff
Copy link

tpfaff commented Jul 7, 2015

Would love to be able to bind array resources.

@BindString binds an R.string ID to a String field.

@BindArray binds an R.array ..........

@tomxor
Copy link
Contributor

tomxor commented Jul 7, 2015

@BindStringArray was introduced in #297 and should probably be available on the next release.

@JakeWharton there's also getIntArray(int), obtainTypedArray(int) and getTextArray(int) -- would you rather have multiple annotations (i.e. @BindIntArray, @BindTypedArray, @BindTextArray) - or switch to @BindArray and figure out which method to call according to the type of element?

@tpfaff
Copy link
Author

tpfaff commented Jul 7, 2015

Awesome!

@JakeWharton
Copy link
Owner

Oops. I thinking switching on @BindArray would be ideal provided there's no change of ambiguity.

@JakeWharton
Copy link
Owner

Although it prevents us from using the support-annotations in the future #144.

@tomxor
Copy link
Contributor

tomxor commented Jul 7, 2015

Can't we use @ArrayRes?

@JakeWharton
Copy link
Owner

Oh it's not typed? I guess that makes sense (but is unfortunate). I'm not an array resources user (hence its omission and my lack of knowledge here). If that's true, then go for it!

@tomxor
Copy link
Contributor

tomxor commented Jul 7, 2015

👍

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

3 participants