Android 接口中含有"\n"不能正常显示

1             String content = mAdvice.getContent();
2             if (content != null) {
3                 if (content.contains("\\n")) {
4                     content = content.replace("\\n", "\n");
5                 }
6                 tvContent.setText(content);
7             } else {
8                 tvContent.setText("");
9             }

 

posted @ 2017-04-17 09:56  鲸歌  阅读(682)  评论(0编辑  收藏  举报