我只是想以某种方式在我的线性布局中添加一个新行:
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);
Run Code Online (Sandbox Code Playgroud)
但这只是增加了几个空格.有人可以帮我吗?谢谢.