我需要当我使用这个代码的\n
分隔符来分割字符串:SPLIT用 n分隔符
String delimiter = "\n";
String[] temp;
temp = description2[position].split(delimiter);
for (int i = 0; i < temp.length; i++) {
holder.weeklyparty_text3.setSingleLine(false);
holder.weeklyparty_text3.setText(temp[i]);
}
但不能从\n
获得拆分字符串。
我从来没有这么做过,但我建议,尽量字符串分隔符= “\\ N” 的; – kosa
我已经尝试过,但仍然没有得到O/P –
什么是输入和什么是你期望的输出? – kosa