为什么在 .txt 中使用 \n 时我的输入流字符串不换行???
我正在尝试阅读,然后将其发布到 TextView 中,但它显示 \n insted to go to new line -.- 足够接近
try {
reader = new InputStreamReader(getAssets().open("koce_podatki.txt"),"UTF-8");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
BufferedReader br = new BufferedReader(reader);
for(int i=-1;i<position;i++){
try {
temp = "" + br.readLine();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}}
try {
reader.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
temp=temp.replaceAll("\n", "\n");
nov = temp.split("\\|");
for(int i=0;i<23;i++){
podatek.add(""+nov[i]);
}