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.
我从服务器接收数据(内部元素很少的对象),我想在 RecyclerView 中显示它。每个对象可以包含 2、3、4.. 甚至 18 个元素(如图所示):
我知道如何从预先创建的 XML 布局创建不同类型的行并在 RecyclerView 中使用所有这些,但是如何处理具有例如 18 个元素的对象?
我是否应该根据每个对象中的许多元素生成行,然后在适配器中对其进行膨胀?
那么,如何在 1 个 RecyclerView 中处理 20+ 种不同类型的行呢?