Adding header view to recyclerview with gridlayout manager
Android Adding header view to recyclerview with gridlayout manager:
To add a header to a recyclerview with a gridlayout, first the adapter needs to be told that the header view is the first position - rather than the standard cell used for the content. Next, the layout manager must be told that the first position should have a span equal to the *span count of the entire list.
Take a regular RecyclerView.Adapter class and configure it as follows:
Comments :
Post a Comment