Android RecyclerView with CardView Example
Read more About RecyclerView
Add support library
The RecyclerView widget is a part of separate library. Add the following dependency in your Gradle build file to use recyclerview.1. Open the build.gradle file for your app module.
2. Add the support library to the dependencies section.
Add RecyclerView in your layout
1. First of all create one layout separate file for RecyclerView so you can manage all property RecyclerView at one place.
include_recyclerview.xml
Include RecyclerView layout
RecyclerView Item Layout using CardView
We need a separate layout for items inside RecyclerView.
create a file row_recylerview.xml
Create RecyclerView Adapter
Create a RecyclerViewAdapter.java class. This class extends RecyclerView.Adapter class and override its unimplemented methods. The onCreateViewHolder() methods inflates the row_recylerview.xml. In the onBindViewHolder() method each data items are set to each row.

good
ReplyDeletethanks
ReplyDelete