Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以将 TableLayout 与 ArrayAdapter 绑定?
框架中没有这样的 API。您可以通过自己查询适配器来手动完成。像这样的东西:
int count = adapter.getCount(); for (int i = 0; i < count; i++) { tableLayout.addView(createTableRow(adapter.getItem(i)); // or tableLayout.addView(adapter.getView(i, null, tableLayout)); }