Let’s talk about RecyclerView!

This is a very important design element for Android and almost every application should implement it. If you were ever thinking that you need to implement a list of items, like recent transactions, or a grid, like photos on Instagram, then RecyclerView should definitely be your friend. The video below will cover it in details.

To follow along you can download or fork my starter code from Github.

There are twelve steps altogether:

Step 1. Import dependency

Step 2. Replace ListView with RecyclerView.

Step 3. Replace ListView with RecyclerView in the Java file.

Step 4. Update the adapter.

Step 5. Update the ViewHolder.

Step 6. Update the constructor.

Step 7. Override onCreateViewHolder method.

Step 8. Override onBindViewHolder method.

Step 9. Modify getCount() method.

Step 10. Attach the new adapter.

Step 11. Attach LayoutManager.

Step 12. Attach new OnClickListener.

%d bloggers like this:

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Subscribe!