TO display a list of items I am using the latest RecyclerView in my app. I want to know would it only work on devices having android 5.0 or would it on work on lower versions as
Yes, it's backwards-compatible, assuming you include the support library for RecyclerView v7 in your application's build.gradle
file:
Make sure you have downloaded the Android Support Repository using the SDK Manager.
Open the
build.gradle
file for your application.Add the support library feature project identifier to the dependencies section just like this:
dependencies {
...
compile "com.android.support:recyclerview-v7:21.0.0.+"
}
That one will work down as low as Android 2.1 (API level 7), hence the name v7