smartTable
smartTable copied to clipboard
第一次查询有数据时,第二次查询为空时并不会清空原有的数据
if (tableData != null) { setTableData(tableData); } return tableData;
再次给表格设值可以先清空上次的值。 if (notNull(smartTable.getTableData())) { smartTable.getTableData().clear(); }
List<BaobiaoTable> l = new ArrayList<BaobiaoTable>() { }; l.add(new BaobiaoTable()); myActivity.get().binding.table.setData(l);
实测设置一个空列表不会出现异常