Android TextView textView.setText("aaa\nbbb");可以自动换行,
但是String s = "aaa\nbbb";
textView.setText(s);
就不能正常换行了,解决:
s = "aaa\nbbb";
s = s.replace("\\n", "\n");
textView.setText(s);正常了
Android TextView textView.setText("aaa\nbbb");可以自动换行,
但是String s = "aaa\nbbb";
textView.setText(s);
就不能正常换行了,解决:
s = "aaa\nbbb";
s = s.replace("\\n", "\n");
textView.setText(s);正常了
转载于:https://my.oschina.net/u/194743/blog/157175