Goodbye Ugly RecyclerAdapters;
Aug 29, 2017 · 1 min read
Hello GhostAdapter

Everyday; Android developers have to use some kind of list! And you need an adapter to display items to the screen. OK, make a Recycler Adapter… but… what if you need to display two different items? OR 3 or more?!
You will end up creating something like this:
Oo! and the ‘position’ you always have to handle the ‘position’ :|
What if there was an easier way!
Meet the GhostAdapter
Just follow 3 steps:
1. Items must be annotated
just bind your layout & viewholder
2. Use GhostAdapter As Recyclerviews adapter
that’s easy
3. Fill the adapter by annotated items
That’s it! add one item or a list! add to a specific position or at the end of list. any class that is annotated correctly will work!
so what?
- reduce boilerplate code..
- increase readability
- reduce mistakes
- only items and view holders no need to implement adapter
- support you if lot’s of UI change happens ;)
I wonder what Aritra Roy thinks about it
compile ‘ir.coderz.ghostadapter:GhostAdapter:0.2@aar’