

LinearLayoutManager: Positions items to look like a standard ListView.There are three types of Layout Managers by default: The RecyclerView has broken out of this functionality to allow for different kinds of layouts: Vertical, Horizontal, Grid, Staggered, or your own!

The ListView used to do this work by itself. This object positions the RecyclerView’s items and tells them when to recycle items that have transitioned off-screen. The most important and interesting component of a RecyclerView is its LayoutManager. You can also create your own animations and apply them as needed. RecyclerView requires a ViewHolder, the RecyclerView knows which animation to apply to which item and adds them as required. The Views in RecyclerView comes with default animations that you don’t have to create or add yourself. This is it why it’s called a RecyclerView! To provide a new view, RecyclerView either creates a new ViewHolder object to inflate the layout and hold those references, or it recycles one from the existing stack. However, you have to create ViewHolders to keep references in memory. RecyclerView still uses an Adapter to act as a data source.

Public class MyRecyclerAdapter extends RecyclerView.The RecyclerView changed everything which was used in the ListView and GridView. The good thing about this is that first method is called only when we really need to create a new view. You will have to override two main methods: one to inflate the view and its view holder, and another one to bind data to the view. It’s a similar approach to the ones you already used, but with some peculiarities, such as a required ViewHolder.

RecyclerView includes a new kind of adapter. If you want to use a RecyclerView, you will need to feel comfortable with three elements: This is Android, so things are never easy. The RecyclerView has been developed with extensibility in mind, so it is possible to create any kind of layout you can think of, but not without a little pain-in-the-ass dose. It is supossed to be the successor of ListView and GridView, and it can be found in the latest support-v7 version. The RecyclerView is a new ViewGroup that is prepared to render any adapter-based view in a similar way. I’ve been playing with RecyclerView these days, and will give you a little presentation of what I discovered so far. Google I/O this week brought a lot of exciting news about Android, and we probably need quite some time to get used to what Android L is bringing.
