以编程方式创建了一个表布局。它看起来是这样的。![在此处输入图像描述](https://i.sstatic.net/uoI42.png)
在这里,我想在每行后面添加水平线,如何通过编程实现。创建表格布局的示例代码
ScrollView ScrollView=新的ScrollView(this);TableLayout resultLayout=新表布局(this);resultLayout.setStretchAllColumns(true);resultLayout.setShrinkAllColumns(true);TableRow tablerowMostRentVehicle=新TableRow(this);表格rowMostRecentVehicle.setGravity(Gravity.CENTER_HORIZONTAL);TextView textViewMostRentVehicle=新文本视图(this);textViewMostRecentVehicle.setText(“最新车辆详细信息”);textViewMostRecentVehicle.setTextSize(类型值.COMPLEX_UNIT_DIP,12);textViewMostRecentVehicle.setTypeface(字体.SERIF,字体.BOLD);tablerowMostRecentVehicle.addView(textViewMostRentVehicle);// ...resultLayout.addView(表格最新车辆);resultLayout.addView(表格行注册标记);resultLayout.addView(tableRowMakeModel);resultLayout.addView(tableRowColour);resultLayout.addView(tableRowChasisNo);resultLayout.addView(表格行首次使用日期);resultLayout.addView(tableRowTypeofFuel);// ...