Gibs:
I have a sorted Arraylist of contacts. I want to Store the list in shared preference. I have tried the below code :
store
SharedPreferences.Editor editor = app_preference.edit();
Setset = new HashSet ();
set.addAll(contact_names_list);
editor.putStringSet("CONTACT_LIST", set);
editor.apply();
The problem is, when I retrieve this from Hashset I got an unsorted list. Is there any other way to store arraylist other than Hashset?
Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE