Skip to main content

Posts

Showing posts from September, 2016

Recycler View Layout Adapter with Header Android Tutorial

Header in Recycler View adapter is very important part of the view, It is the place where you want to add a title or heading of the layout item.  So let's create a header for our Recycler View which automatically works as we will use our adapter for creating the header for our Recycler View.  The Recycler View header will automatically fix and change the header contains depending on the input provided at the time of initializing the recycler view adapter.  I am writing this here because initially, I face lots of problem in the implementation of the header but after some research and of course on the cost of some time, I realized that it is quite easy.

I am writing this here because initially, I face lots of challenges when I was trying to add it for the first time but after some research and of course on the cost of some time, I realized that it is quite easy.
Create Project
1. Create a Project for Recycler View and select the name of the project for example here I am taking the name…

What is Recycler View in Android and Advantage over List and Grid View

Recycler view is one of the latest views that is getting used today in most of the android application.  Earlier where Grid View and List View are very popular now programmer are using Recycler View because it has some advantage over the List View and Grid View.
In another word, we can simply say that Recycler View is the more advanced version of the list view more functionality and reliability, where you can have much more control over your view item.

Here is more details about design pattern using recycle view


Advantages of Recycler View over List & Grid View

ViewHolder Pattern- In List view View Holder pattern can be used but it is not mandatory but in Recycler View it is mandatory. Its increased some programming complexity but solved lots problem of list and grid view.


LayoutManager- In Recycler View you can easily so the different kind of the layout for different Item. You can show the different layout for header or footer, use of Gird and List layout and many more custom modifica…