Android Studio (Android)这些变量是什么?[closed]

bfhwhh0e  于 2022-11-16  发布在  Android
关注(0)|答案(1)|浏览(117)

**已关闭。**此问题需要debugging details。当前不接受答案。

编辑问题以包含desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem。这将有助于其他人回答问题。
两年前就关门了。
此帖子已在5天前编辑并提交审核,无法重新打开:
原始关闭原因未解决
Improve this question
来源: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();
  • myScores是否指共享首选项?
  • listOfExistingScores指的是什么?是数组列表吗?
  • scoreEditor是指数组列表?还是列表视图?还是自定义列表视图?
ws51t4hk

ws51t4hk1#

根据该回答,您可以说这三个变量定义了以下内容:

我的分数:

正如你在op中所说的,它是共享偏好变量,它包含sharedpreference

现有分数列表:

用户声明的数组,存储在hashset中。

评分编辑器:

乐谱编辑器是sharedpreferences editor。你可以通过给定的链接阅读更多关于它的细节。

相关问题