var tableRow = new TableRow(this);
tableRow.LayoutParameters = new TableLayout.LayoutParams(TableLayout.LayoutParams.FillParent,
TableLayout.LayoutParams.WrapContent);
tableRow.Background=这里这么写
写完必须脱坑靠找不到帮助文档 java随便找到了
Resources resource = context.getResources();
row.setBackgroundColor(resource.getColor(R.color.red)
ps 希望可以给分