SkillAgentSearch skills...

RecyclerViewTemplate

One Template which solves all frequently used RecyclerViews Code Snippets

Install / Use

/learn @ckdevrel/RecyclerViewTemplate

README

<a href='https://ko-fi.com/A302HW7' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi4.png?v=f' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>

Looking for contributors to make this template even more better.

Pending Items:

  1. Rewrite to kotlin.
  2. Update dependencies.
  3. Implement new view holders, etc.

RecyclerViewTemplate

The main purpose of this repo is to reduce the boiler plate code used in RecylerView's for different views and use cases. Yeah! All you have to just mark the fields in the template wizards. Now, you're good to go.

Supports

This template supports RecyclerView customziations like list, grid, header, footer, header-footer, toggle, checkbox, radio, google play like RecyclerView and Section RecyclerView.

RecyclerView Style

The following are the different types of RecyclerView styles and pattern made from this template.

Simple RecyclerView (List & Grid)

VERTICAL:

<a href="http://imgur.com/O82WCuh"><img src="http://i.imgur.com/O82WCuh.png" title="source: imgur.com" height="403" width="200"/></a> <a href="http://imgur.com/ODaJwUJ"><img src="http://i.imgur.com/ODaJwUJ.png" title="source: imgur.com" height="403" width="200" /></a> <a href="http://imgur.com/kuSP6oi"><img src="http://i.imgur.com/kuSP6oi.png" title="source: imgur.com" height="403" width="200" /></a> <a href="http://imgur.com/7skEIav"><img src="http://i.imgur.com/7skEIav.png" title="source: imgur.com" height="403" width="200"/></a>

HORIZONTAL:

<a href="https://imgur.com/fBn0pjm"><img src="https://i.imgur.com/fBn0pjm.png" title="source: imgur.com" height="403" width="200" /><a href="https://imgur.com/AzPUfkY"><img src="https://i.imgur.com/AzPUfkY.png" title="source: imgur.com" height="403" width="200"/></a>

Banner RecyclerView (List & Grid)

VERTICAL:

<a href="https://imgur.com/RaNfYKd"><img src="https://i.imgur.com/RaNfYKd.png" title="source: imgur.com" height="403" width="200" /></a><a href="https://imgur.com/ahIYXNd"><img src="https://i.imgur.com/ahIYXNd.png" title="source: imgur.com" height="403" width="200"/></a>

HORIZONTAL:

<a href="https://imgur.com/Ese7xAW"><img src="https://i.imgur.com/Ese7xAW.png" title="source: imgur.com" height="403" width="200"/></a>

Header, Footer and Header-Footer RecyclerView (List & Grid)

VERTICAL:

<a href="http://imgur.com/N4xHlWU"><img src="http://imgur.com/N4xHlWU.png" title="source: imgur.com" height="403" width="200"/></a><a href="http://imgur.com/7dlO9ow"><img src="http://imgur.com/7dlO9ow.png" title="source: imgur.com" height="403" width="200"/></a><a href="http://imgur.com/2JQJRfF"><img src="http://imgur.com/2JQJRfF.png" title="source: imgur.com" height="403" width="200"/></a><a href="http://imgur.com/byRiepd"><img src="http://imgur.com/byRiepd.png" title="source: imgur.com" height="403" width="200"/></a><a href="http://imgur.com/uXc9Q2A"><img src="http://imgur.com/uXc9Q2A.png" title="source: imgur.com" height="403" width="200"/></a><a href="http://imgur.com/PAabrBs"><img src="http://imgur.com/PAabrBs.png" title="source: imgur.com" height="403" width="200"/></a>

HORIZONTAL:

<a href="https://imgur.com/9rCwbGa"><img src="https://i.imgur.com/9rCwbGa.png" title="source: imgur.com" height="403" width="200" /></a><a href="https://imgur.com/dhJT1Hm"><img src="https://i.imgur.com/dhJT1Hm.png" title="source: imgur.com" height="403" width="200" /></a>

Checkbox, Radiobutton, Toggle Switch RecyclerView (List & Grid)

VERTICAL:

<a href="http://imgur.com/6l0K3ku"><img src="http://imgur.com/6l0K3ku.png" title="source: imgur.com" height="403" width="200"/></a><a href="http://imgur.com/Igfxrzk"><img src="http://imgur.com/Igfxrzk.png" title="source: imgur.com" height="403" width="200"/></a><a href="http://imgur.com/d9oVKbm"><img src="http://imgur.com/d9oVKbm.png" title="source: imgur.com" height="403" width="200"/></a><a href="http://imgur.com/l8t8vTm"><img src="http://imgur.com/l8t8vTm.png" title="source: imgur.com" height="403" width="200"/></a><a href="http://imgur.com/wmrlVAm"><img src="http://imgur.com/wmrlVAm.png" title="source: imgur.com" height="403" width="200"/></a><a href="http://imgur.com/hn0NoGI"><img src="http://imgur.com/hn0NoGI.png" title="source: imgur.com" height="403" width="200"/></a>

HORIZONTAL:

<a href="https://imgur.com/9WTee9I"><img src="https://i.imgur.com/9WTee9I.png" title="source: imgur.com" height="403" width="200"/></a><a href="https://imgur.com/2Z8Gsu6"><img src="https://i.imgur.com/2Z8Gsu6.png" title="source: imgur.com" height="403" width="200" /></a><a href="https://imgur.com/3uFsEQ8"><img src="https://i.imgur.com/3uFsEQ8.png" title="source: imgur.com" height="403" width="200" /></a><a href="https://imgur.com/SCFMxJ4"><img src="https://i.imgur.com/SCFMxJ4.png" title="source: imgur.com" height="403" width="200" /></a><a href="https://imgur.com/v0NoAJf"><img src="https://i.imgur.com/v0NoAJf.png" title="source: imgur.com" height="403" width="200" /></a><a href="https://imgur.com/teNKd3D"><img src="https://i.imgur.com/teNKd3D.png" title="source: imgur.com" height="403" width="200" /></a>

Google Play Like RecyclerView

<a href="http://imgur.com/NbZOHjY"><img src="http://imgur.com/NbZOHjY.png" title="source: imgur.com" height="403" width="200"/></a>

Section RecyclerView

<a href="http://imgur.com/dU1QDpC"><img src="http://i.imgur.com/dU1QDpC.png" title="source: imgur.com" height="403" width="200" /></a>

Implementation

  1. Download or clone this repo

<a href="http://imgur.com/Fpn5F1Q"><img src="http://i.imgur.com/Fpn5F1Q.png" title="source: imgur.com" height="103" width="400"/></a>

  1. Rename the downloaded folder to RecyclerViewTemplate and copy the complete folder.

<a href="http://imgur.com/bMZ2ljK"><img src="http://i.imgur.com/bMZ2ljK.png" title="source: imgur.com" height="203" width="400" /></a>

Paste the selected files into

For Mac

Go to Applications, Choose Android Studio, Right click and select Show Package Contents options.

<a href="http://imgur.com/6jkayYm"><img src="http://i.imgur.com/6jkayYm.png" title="source: imgur.com" height="153" width="400"/></a>

Navigate to > Contents - Plugins - android - lib - templates - other - paste the downloaded RecyclerViewTemplate folder

For Windows

Go to C - Program Files - Android - Android Studio

C:\Program Files\Android\Android Studio\

Navigate to Plugins - android - lib - templates - other - paste the downloaded RecyclerViewTemplate folder

<a href="http://imgur.com/g6vPucq"><img src="http://i.imgur.com/g6vPucq.png" title="source: imgur.com" height="203" width="250"/></a> <a href="http://imgur.com/16P1k0s"><img src="http://i.imgur.com/16P1k0s.png" title="source: imgur.com" height="203" width="300"/></a>

<a href="http://imgur.com/JIg6iwM"><img src="http://i.imgur.com/JIg6iwM.png" title="source: imgur.com" height="203" width="300"/></a>

Usages

It is easy and pretty straight forward

  • Open your project in Android Studio.
  • Right click on your project root package.
  • Navigate to New - Other - RecyclerViewTemplate

<a href="http://imgur.com/o1FYRmU"><img src="http://i.imgur.com/o1FYRmU.png" title="source: imgur.com" /></a>

Yeah! Cool! Now Template wizard is up, Just play with it to generate code snippets for your requirement.

<a href="http://imgur.com/JJLxTvp"><img src="http://i.imgur.com/JJLxTvp.png" title="source: imgur.com" height="403" width="500"/></a>

<a href="http://imgur.com/IHgvPKu"><img src="http://i.imgur.com/IHgvPKu.png" title="source: imgur.com" height="403" width="500"/></a>

<a href="http://imgur.com/P0bSDy4"><img src="http://i.imgur.com/P0bSDy4.png" title="source: imgur.com" height="403" width="500"/></a>

Add on's

Hate working with FAB, toolbar, search, cardview, fragment, swiperefresh layout, pagination, divider, header, footer?

Now it's just a checkbox away. This template provides an option of enabling/disabling the states of add on's in an easy with checkboxes.

Customizations

Yes of course there's a way for that too! According to the benchmark of this template there are more than 250+ combinations of RecyclerView's can be made without even writing a single piece of code. Still you can modify source of the template from RecyclerViewTemplate/root/src/app_package/ files.

Contributions

Pull requests and contributions are most welcome.

Any type of RecyclerView on mind? You can always drop a mail!.

Credits and References?

https://github.com/gabrielemariotti/AndroidStudioTemplate

https://github.com/benoitletondor/Android-Studio-MVP-template

View on GitHub
GitHub Stars411
CategoryDevelopment
Updated2mo ago
Forks81

Languages

FreeMarker

Security Score

85/100

Audited on Feb 1, 2026

No findings