我需要當我使用這個代碼的\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