Posts

Showing posts with the label Sectioned RecyclerView

Sectioned RecyclerView in android

Image
Sectioned RecyclerView in android Created a sample Sectioned RecyclerView Application. I used the following Library to easily create this one. https://github.com/afollestad/sectioned-recyclerview Credits : Aidan Follestad Step: 1 ====== Add a dependency to the build.gradle file [ or] You can download the SectionedRecyclerViewAdapter .java file and put in it your source code. compile ( ' com . github . afollestad : sectioned - recyclerview: 0.1 . 0 ' ) { transitive = true } Step: 2 ====== Created a Sample Activity with RecyclerView in the Xml Layout file. Populated with dummy data for sample. package com . pratap . sectionrecyclerview ; import android.os.Bundle ; import android.support.v7.app.AppCompatActivity ; import android.support.v7.widget.GridLayoutManager ; import android.support.v7.widget.RecyclerView ; import android.support.v7.widget.Toolbar ; import com.pratap.sectionrecyclerview.models.DataModel ; import com.pratap.sectionrecyclerview.utils