private ArrayList<String> mArrayList = new ArrayList<String>();
mArrayList.clear();
mArrayList.add("test 3");
mArrayList.add("test 21");
mArrayList.add("test 4");
mArrayList.add("test 6");
mArrayList.add("test 1");
Collections.sort(mArrayList);
for (int i = 0; i < mArrayList.size(); i++) {
Log.e("TAG", "" + mArrayList.get(i));
}
Result is:
test 1
test 21
test 3
test 4
test 6
But i want:
test 1
test 3
test 4
test 6
test 21
I sorted it but not perfectly, How to do that, i don't know, if you have any idea, than please share with me.