It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened,
visit the help center。
7年前关闭。
基本上,我创建一个表格行,并在其中创建一些视图并放入布局中,但是当我使用
someview.LayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT,
TableRow.LayoutParams.WRAP_CONTENT,Gravity.CENTER_vERTICAL));
它不起作用,但是一个奇怪的事实是,如果我在xml中声明表行并将table_gravity放在表行内的某个视图中,它将起作用。有人知道为什么吗?