Is it important to add dependencies for RecyclerView if my app is only going to run on Android Lollipop and newer versions?
A lot of tutorials keep adding these dependencies but I am not sure if they do it to support very old devices.
Thanks.
Is it important to add dependencies for RecyclerView if my app is only going to run on Android Lollipop and newer versions?
A lot of tutorials keep adding these dependencies but I am not sure if they do it to support very old devices.
Thanks.
Copyright © 2021 Jogjafile Inc.
Short Answer
There is no need to include additional dependencies for
RecyclerView.Extended Answer
Since your app is going to run on
Android Lollipop (API Level 21)and newer versions, it is not necessary to add specific dependencies forRecyclerView.RecyclerViewis part of theAndroid Support Library, which was included to provide backward compatibility for older versions.Since
API level 21,RecyclerViewwas included in theAndroidframework, so you can use it without adding any dependencies in yourgradlefile, now are in theAndroidXlibraries, so now theRecyclerViewclass is available inandroidx.recyclerview.widget, which is part of theAndroidXlibraries.