Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
大家好,我是整个 android 世界的新手。我从我的琐事应用程序开始,但我无法在这里弄清楚如何随机化用户将选择的选项我的意思是我将提供 4 个选项,但我想要一个随机选项存储答案,但我不知道如何实现它。一点帮助将不胜感激???
如果您有作为项目列表的选项,您可以使用Collections.shuffleshuffle 然后将它们显示为单选按钮。
Collections.shuffle