Android5.0 v7扩展包之RecyclerView
Posted changhaiSmile
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android5.0 v7扩展包之RecyclerView相关的知识,希望对你有一定的参考价值。
android5.0 v7扩展包之RecyclerView
近日Google发布了Android5.0 SDK,随之android L的部分预览功能也发布了正式版本。本文将介绍RecyclerView
。
RecylerView
简介
The RecyclerView widget is a more advanced and flexible version of ListView. This widget is aContainer for displaying large data sets that can be scrolled very efficiently by maintaining a limited number of views. Use the RecyclerView widget when you have data collections whose elements change at runtime based on user action or network events.
大意是RecylerView
是一个高级的ListView
。可以很好的维护大数据集的滚动和显示。详细的解释参考这里。本文的内容也是基于此而写。
RecylerView
在那里
- 包名:
android.support.v7.widget.RecyclerView
- 文件地址有两个
- 1:
android-sdk/extras/android/m2repository/com/android/support/recyclerview-v7
- 2:
android-sdk/extras/android/support/v7/recyclerview
- 1:
RecylerView
怎么引用
Android Studio
<span style="font-size:18px;">dependencies {
compile 'com.android.support:recyclerview-v7:21.0.0'
}</span>
以上是关于Android5.0 v7扩展包之RecyclerView的主要内容,如果未能解决你的问题,请参考以下文章
support v7兼容包的用途(三 、v7兼容包和系统自带的比较和注意点)
xml 在ViewHolder中为Recycler View扩展视图