My arrays.xml:
<string-array name="chart_names">
<item>abc</item>
</string-array>
My testing code:
String[] chartNames = getActivity().getResources().getStringArray(R.array.chart_names);
if ("abc" == chartNames[0]) {
Log.v("msg", "yes");
}else{
Log.v("msg", "no");
}
I always get false, so the console always prints "no".
Why does this happened ? It's really strange.....
Please help me....... Thanks.