I want to use the shared preferences to save a list of integers. it's simple by using the putStringSet() methode.
final Set<String> set = new TreeSet<String>();
for (final Station station : stations) {
set.add(String.valueOf(station.getId()));
}
editor.putStringSet(USER_STATIONS, set);
but there's a big problem. the list isn't sorted anymore after loading the prefereneces with getStringSet()
Is there an other/better way than save the list as json or as a string with comma seperated values?