Android - 在TextView中打印逗号

时间:2016-12-22 21:09:18

标签: android textview comma

我找了一些解决方案,但没有一个能奏效 我想要实现的是,我将在列表中插入包含逗号的数组列表值:

ArrayList<Integer> arrList = new ArrayList<>();
arrList.add(1, 2);
textView.setText(TextUtils.join(" , ", arrList));                   // Output: 1  2
textView.setText(TextUtils.join(" \u002c ", arrList));              // Output: 1  2
textView.setText(TextUtils.join(Html.fromHTML(" &#44; ", arrList)); // Output: 1  2

0 个答案:

没有答案