在 android 中创建数据 table 的最佳方法是什么?

What is the best way to create a data table in android?

我想创建一个 table,它由来自 DB 的数据 填充。我知道 可以使用 TableLayout 创建动态 table 但我'我不确定这是我的最佳解决方案。
Here is an example of what I want to create(the first table on the page).

我会告诉你我的意见。

如果您的数据有限,并且您确定要以可呈现的方式在一个屏幕中显示所有数据,那么是的,TableLayout 就足够了。

然而,在现实世界中,灵活性很重要,因此您应该始终考虑数据在未来可能扩展的可能性。请记住,在这种情况下,您应该使用 ListView 或 RecyclerView。为列表或回收器视图的每一行定义基本布局,然后使用合适的适配器将数据库中的数据连接到此视图。

对于初学者: https://developer.android.com/training/material/lists-cards.html