当前位置:首页 > android GridLayout 设置子元素的rowspan,colspan,并填充单元格

android GridLayout 设置子元素的rowspan,colspan,并填充单元格

点击次数:4201  更新日期:2018-09-06

android GridLayout 设置子元素的rowspan,colspan,并填充单元格


LinearLayout layout = new LinearLayout(Activity_TableEdit.this);
GridLayout.LayoutParams layoutParams = new GridLayout.LayoutParams();
layoutParams.rowSpec = GridLayout.spec(currentRow, field.getFieldRowSpan2(), GridLayout.FILL);
layoutParams.columnSpec = GridLayout.spec(currentColumn, field.getFieldColSpan2(), GridLayout.FILL);
gridLayout.addView(layout,layoutParams);