Recyclerview to the rescue
summary
Live demo shows a sample app (code on GitHub) that replaces ListView/GridView with RecyclerView, builds grids where items span columns with GridLayoutManager.SpanSizeLookup, embeds a nested horizontal RecyclerView inside a column and swaps between list/grid and orientations at runtime using LinearLayoutManager and GridLayoutManager (staggered grid supported). Uses adapter view types and enforced ViewHolder pattern, and gets animations by calling notifyItemInserted/Removed so adds/removes animate smoothly rather than redrawing all items.
AI-written summary · about
chapters (12)
- 0:00Start
- 0:23Recyclerview
- 2:31The Genymotion Emulator
- 2:45Demo
- 6:04Horizontal Scroll View
- 7:58Why Should You Use It
- 8:47The Recyclerview Knows How To Recycle Views
- 9:44Adapter
- 11:12Item View Type
- 14:20View Holder
- 20:52Modifying the List Contents
- 23:49Recyclerview Is the Future
related talks
37mRecyclerViews – A Developer’s deep dive
48mPro RecyclerView
33mListView - Recycle Your Knowledge
46mRecyclerView Animations and Behind the Scenes
45mGraywater: A Framework for Fast Scroll Performance
42mRecyclerView 13000
36mSmoke & Mirrors the Magic behind Wonderful UI in Android
41mEfficient Lazy Loading for RecyclerView with Room
