String[] array =
getContext().getResources().getStringArray(R.array.DevCategories);
to get an array. I the call this:
Arrays.binarySearch(array,"Plan"));
it returns -5, I am sure the first value of the array is Plan. What happend?
By the way, the current class is extended from ContentProvider. I am writing a Provider.
I use this code get -5
String.format("%d",Arrays.binarySearch(array,"Plan")));
String.valueOf(Arrays.binarySearch(array,"Plan")));
both are -5
R.array.DevCategories from string.xml file.
<string-array name="DevCategories">
<item>Plan</item>
<item>Design</item>
<item>Coding</item>
<item>Debug</item>
<item>Test</item>
<item>Release</item>
</string-array>