Java android:使用 TextView 追加换行符
我只想以某种方式在我的线性布局中添加一个新行:
layout = (LinearLayout) findViewById (R.id.layout);
... //some other code where I've appended some strings already
final TextView nline = new TextView(this);
nline.setText(Html.fromHtml("<br>")); //i also tried: nline.setText("\n");
layout.addView(nline);
但这只会增加一些空间。有人可以帮助我吗?谢谢。