Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bind array of strings in the butterknife

I'm trying to bind array of strings using butterknife. But seems that there is no way (but in processor there is a method to bind array).

Here is my code:

strings.xml

<string-array name="test_strings">
    <item>VK</item>
    <item>Facebook</item>
    <item>Twitter</item>
    <item>Instagram</item>
    <item>Google plus</item>
    <item>Google mail</item>
</string-array>

MainActivity

@Bind(R.string.test_strings)
protected String [] mStrings;
like image 828
Anton Shkurenko Avatar asked Jul 09 '15 12:07

Anton Shkurenko


1 Answers

Five mins ago Butterknife 8.0.0 was released.

R.string.test_array change to R.array.test_array

And @Bind to @BindArray

like image 78
Anton Shkurenko Avatar answered Nov 08 '22 22:11

Anton Shkurenko