I'm trying to put user names in string set by using SharedPreferences.putstringset, the problem is that I want to get each  name(value) the user put and add it to an arraylist and print each value.
I tried pref.getstringset but I don't know how to do it.
SharedPreferences.Editor editor=pref.edit();
editor.putStringSet("user names",usernames.getText().toString());
editor.commit();
 
     
     
    