try:
yourString.replace("\\n", "\n");

解决方案 »

  1.   

    我读取的是windows环境下编辑的文本文件,故换行都是"\r\n",但是我把文件内容读取出来后,显示出来之前都已经用replace("\r\n", "\n");,Android4.0上EditText还是不能换行的,Android2.3是能换行的。
      

  2.   

    看看Android4.0上EditText的源代码
      

  3.   

    maybe you can try to test a demo that write something into edittext on 4.0 .and then get the content . lookup the string is what
      

  4.   

    txt_edit = (EditText) findViewById(R.id.txt_edit);
    txt_edit.setText("村\n可");
    经我在android 2.3.5  和4.2上测试,都可以换行