【发布时间】:2017-04-14 15:03:25
【问题描述】:
当我在 textview 中执行 setText 时,它只显示数组的前三行,我需要找到一种方法来执行 result = result + xx.split("\n");但是在不可能的字符串数组中,你能教我其他方法吗?
String xx="";
String result[] = {};
for(int i=0;i<row;i++) {
for(int c=0;c<col;c++) {
Cell z=s.getCell(c,i);
//Need an alternative to this because cannot do this in string array
result = result+ xx.split("\n");
}
}
textview.setText(resultado[0]+"--"+resultado[1]+"--"+resultado[2]);
【问题讨论】:
-
String xx为空?此外,遍历result,将值添加到有问题的textView,而不是result += "something"; -
为什么不将
split存储在一个数组中,然后通过它进行交互? -
字符串 xx 不为空。你能举个例子吗?
-
@nIcEcOw 你能举个例子吗?
标签: java android arrays string