Android Basics – Using Layout Manager with Recycler View to arrange Views

The advantage of using a RecyclerView over ListView is that you get the option to arrange how the views display.

You have the option to display views in a linear list, a grid or a staggered grid.

To use the LayoutManager you need to add the following code

LinearLayoutManager manager = new LinearLayoutManager(this);
recyclerView.setLayoutManager(manager);

Source code is available here

Author: codesmartly

I am Enthusiastic about Learning new things and sharing my Knowledge. I like programming and have a pretty good background in Computer Science.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s