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.
<string name="next_toast">Correct</string>
我希望将值更改为变量
例如
next_toast = getNextQuestion();
我该如何做到这一点
资源是恒定的,根据定义,它们不能更新。但是,Toast.makeText()有两个版本,一个采用字符串资源 id,另一个采用普通CharSequence(字符串)。
Toast.makeText()
CharSequence
吐司文档