【问题标题】:android: Fragment for RecycleViewandroid:RecyclerView 的片段
【发布时间】:2017-07-08 14:15:37
【问题描述】:

我读到了 ListView 和 RecycleView。我了解到 RecycleView 是 ListView 的更高级和灵活的版本。所以像 ListFragment for listView,RecyleView 有没有内置的片段?如果我需要在片段中使用 RecycleView,那么实现它的正确方法是什么?

【问题讨论】:

标签: android listview android-fragments android-recyclerview


【解决方案1】:

RecyleView 有内置片段吗?

没有。没有。

listviewListFragment 不同,RecyclerView 没有提供任何默认实现。 RecyclerView 可通过 support-v7 库获得,它不与 Android 源代码捆绑在一起。

RecyclerViewListView 之间的区别请查看:

Recyclerview vs ListView

这里有一些你想阅读的好资源:

Creating Lists and Cards

Using the RecyclerView

还有一个例子:

RecyclerViewFragment

【讨论】:

    【解决方案2】:

    【讨论】:

      猜你喜欢
      • 2018-01-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-21
      • 2016-10-26
      • 1970-01-01
      相关资源
      最近更新 更多