`private static TableRow createRow(String backgroundColor, String style, List<String[]> mRowTexts, boolean isTitle, boolean needSpan) {
TableRow row = TemplateHandler.Table.Row.build();
for (int i = 0; i < mRowTexts.size(); i++) {
String[] rowText = mRowTexts.get(i);
Text[] array = new Text[rowText.length];
for (int j = 0; j < rowText.length; j++) {
Text xEasyPdfTemplateText = TemplateHandler.Text.build().setText(rowText[j]).setFontSize("9");
array[j] = xEasyPdfTemplateText;
}
TableCell cell = TemplateHandler.Table.Cell.build().addComponent(
array
)
.setBorder("1pt")
.setBorderStyle("solid")
.setBorderColor("#C4C4C4")
.setBackgroundColor(backgroundColor)
.setHorizontalStyle(style);
if (!isTitle && i == 0 && needSpan) {
cell.setRowSpan(2);
}
if (i < 2) {
cell.setWidth("50");
} else if (!isTitle) {
cell.setHorizontalStyle("left");
}
row.addCell(
cell
);
}
return row;
}`