Create your account

Already have an account? Login here

Note: By joining, you will receive periodic emails from Coursetro. You can unsubscribe from these emails.

Create account

61. Introduction to the Recycler View

Design + Code an Android App from Scratch

Woah, wait a second..

Scrounge up some loose change to become a pro member, or login to your account to view this lesson.

Alright, join now. Or login to your account if you're already a pro member.

The RecyclerView widget is a more advanced and flexible version of ListView. This widget is a container for displaying large data sets that can be scrolled very efficiently by maintaining a limited number of views. Use the RecyclerView widget when you have data collections whose elements change at runtime based on user action or network events. The RecyclerView class simplifies the display and handling of large data sets by providing Layout managers for positioning items and Default animations for common item operations, such as removal or addition of items. You also have the flexibility to define custom layout managers and animations for RecyclerView widgets. To use the RecyclerView widget, you have to specify an adapter and a layout manager. To create an adapter, extend the RecyclerView.Adapter class. A layout manager positions item views inside a RecyclerView and determines when to reuse item views that are no longer visible to the user. To reuse (or recycle) a view, a layout manager may ask the adapter to replace the contents of the view with a different element from the dataset. Recycling views in this manner improves performance by avoiding the creation of unnecessary views or performing expensive findViewById() lookups. RecyclerView provides LinearLayoutManager which shows items in a vertical or horizontal scrolling list, GridLayoutManager which shows items in a grid, StaggeredGridLayoutManager which shows items in a staggered grid.

Course Cirriculum