-1

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();
  • is myScores refers to sharedpreference?
  • what is listOfExistingScores refers to? is it ArrayList?
  • is scoreEditor refers to ArrayList? or ListView? or custom ListView?
CuriousNewbie
  • 319
  • 4
  • 13

1 Answers1

0

According to that answser you can say that those three variable defines following things :

myScores :

As you said in op, it's shared preference variable. It holdes sharedpreference.

listOfExistingScores :

It refers to the array declared by user. It is stored in hashset.

scoreEditor :

Score editor is sharedpreferences editor. You can read more details about it by given link.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Ashish
  • 6,791
  • 3
  • 26
  • 48