RecyclerView Android ਵਿੱਚ ਡੇਟਾ ਦੀ scrollable lists ਨੂੰ ਕੁਸ਼ਲਤਾ ਨਾਲ ਪ੍ਰਦਰਸ਼ਿਤ ਕਰਨ ਲਈ ਸਟੈਂਡਰਡ ਕੰਪੋਨੈਂਟ ਹੈ। ਇਹ ਹਰੇਕ ਆਈਟਮ ਲਈ ਇੱਕ view ਬਣਾਉਣ ਦੀ ਬਜਾਏ views ਨੂੰ "recycle" ਕਰਦਾ ਹੈ (ਜਿਵੇਂ ਤੁਸੀਂ scroll ਕਰਦੇ ਹੋ ਤਾਂ ਉਹਨਾਂ ਨੂੰ ਮੁੜ ਵਰਤਦੇ ਹੋ) — ਲੰਬੀ lists ਦੇ ਨਾਲ performance ਲਈ ਜ਼ਰੂਰੀ ਹੈ।
RecyclerView ਕਿਉਂ (recycling ਸੰਕਲਪ)
Displaying a long list naively (a view per item) is WASTEFUL — thousands of items =
thousands of views = memory/performance problems.
RECYCLERVIEW reuses a small pool of views:
→ only views for VISIBLE items exist; as you scroll, off-screen views are RECYCLED
(re-bound with new data) for newly-visible items
→ constant memory regardless of list size → smooth, efficient scrolling
→ This recycling is the key to performant lists.
