Skip to content

NohaSamir/AndroidTemplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Android Templates

To add template to android studio link :

File > Settings > Select "File and Code Templates" > Create a new template:


RecyclerView Adapter Templates

As Android Developers, we all use RecyclerView's. And the process of setting up any RecyclerView is mostly the same.

You build a model for the data
Create a layout for each list item
Build a RecyclerView.Adapter
Initialize the RecyclerView in your activity/fragment

I'm going to give you a template you can add to your Android Studio so creating a RecyclerView Adapter can be done in a few clicks.

1- RecyclerAdapter

This template use the powerful of DiffUtil & AsyncListDiffer class to update the list

DiffUtil: is a utility class that can calculate the difference between two lists and output a list of update operations that converts the first list into the second one. DiffUtils is based on Eugene Myers’ algorithm.

Note: Use this template to create adapter with custom submitList() method

This template developed by CodingWithMitch , I'm just add new method addItems

2-RecyclerListAdapter

This template use the powerful of ListAdapter<T, VH>


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published