source: this post
//Retrieve the values Set<String> set = myScores.getStringSet("key", null); //Set the values Set<String> set = new HashSet<String>(); set.addAll(listOfExistingScores); scoreEditor.putStringSet("key", set); scoreEditor.commit();
myScoresrefers to sharedpreference?
- what is
listOfExistingScoresrefers to? is it ArrayList?
scoreEditorrefers to ArrayList? or ListView? or custom ListView?
According to that answser you can say that those three variable defines following things :
As you said in op, it’s shared preference variable. It holdes
It refers to the array declared by user. It is stored in hashset.
Score editor is sharedpreferences editor. You can read more details about it by given link.
Answered By – Ashish