这是以编程方式设置文本的正确方法吗TextView?
points_txt.setText(R.string.you_have + current_points + R.string.points);`
Run Code Online (Sandbox Code Playgroud)
它向我显示了该字符串的 ResourcesNotFoundException 错误,而我可以在 strings.xml 文件中看到该字符串。
points_txt.setText(getResources().getString(R.string.you_have) + current_points + getResources().getString(R.string.points));
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4798 次 |
| 最近记录: |