Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Conversation

@dodgex
Copy link
Member

@dodgex dodgex commented Nov 15, 2015

see #1625

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should handle the empty array here as well (I think it is possible to define an empty string array resource or not?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

emtpy string array resource should not be a prolem. this code generates new HashSet<>(Arrays.asList(res.getStringArray(R.array.xxx))); if the resource is empty, the array is emtpy, the list is empty and the set is empty. also i think we have no way to access the number of items of a resource on compile time as the value might be diffrent for e.g. locales or screen sizes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay.

@WonderCsabo
Copy link
Member

Can you extend @DefaultRes javadoc and explain which method return value should use which resource type?

@dodgex
Copy link
Member Author

dodgex commented Nov 15, 2015

@WonderCsabo is the table ok?

@WonderCsabo
Copy link
Member

I think you are missing long in the table.

@dodgex
Copy link
Member Author

dodgex commented Nov 15, 2015

yeah you are right.

WonderCsabo added a commit that referenced this pull request Nov 15, 2015
…faultres

Support string arrays in @DefaultRes
@WonderCsabo WonderCsabo merged commit b42fd76 into androidannotations:develop Nov 15, 2015
@WonderCsabo WonderCsabo added this to the 4.0 milestone Nov 15, 2015
@WonderCsabo
Copy link
Member

Nice, thanks.

@dodgex dodgex deleted the 1625_support_string_arrays_in_defaultres branch November 15, 2015 10:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants