//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-579a7451b5ecf937 — 9 أكتوبر,2016

//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-579a7451b5ecf937


//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-579a7451b5ecf937

Advertisements
Welcome Devs 👋 — 29 أكتوبر,2017
Welcome Devs 👋 —
Welcome Devs 👋 —
Welcome Devs 👋 —
Android RecyclerView – The Basics —
Android RecyclerView – The Basics —
Android RecyclerView – The Basics —

Android RecyclerView – The Basics

TheRubberDuckDev

When it comes to displaying a lot of similar data on mobile, you usually rely on List or Grid structure. In Android you can implement this using ListView for Lists, GridView for Grids, or RecyclerView for both.
RecyclerView provides advanced set of features to enable complex animations, child view decorations and performance compared to ListView or GridView.

How it works

Adapter and ViewHolder

RecyclerView uses the Adapter class to bind the data that you want to display to the corresponding Views. Unlike ListView, ViewHolder is mandatory in RecyclerView. ViewHolder stores some meta information about the position of the view in the RecyclerView. ViewHolder should be used to cache findViewById of child views.

LayoutManager

The way in which the data should be rendered i.e., either List or Grid is specified using a LayoutManager. LayoutManager does the actual layout of the child views. RecyclerView provides three basic LayoutManagers:

View original post 953 more words