Okay so i take stringarrayI from sharedpreference.I put this in String Array with split with delimeter ",".Now i parse this into ArrayList.
Log.d("stringArrayIget:", "" + stringArrayI);
String[] strArrayI = stringArrayI.split(",");
ArrayList<Integer> intArrayI = new ArrayList<Integer>();
for (int i = 0; i < strArrayI.length; i++) {
Log.d("strArrayI: ", strArrayI[i].toString());
Log.d("strArrayILength: ", "" + strArrayI.length);
intArrayI.add(Integer.valueOf(strArrayI[i]));
}
Log.d("intArrayI: ", Integer.valueOf(strArrayI[i]).toString());
}
I take stringArrayI from sharedpreference and in Log i get 01234 what i want in my program.When i put that into String Array i get 01234.That's ok.But when i try to parse that into ArrayList of Integer i get only 1234 without 0.Why is that?Tnx.
Aucun commentaire:
Enregistrer un commentaire