‫In the previous video we ran the application and the recycler view is missed.
‫This is due to the absence of the linear layout manager for the recycler view and the linear layout
‫manager is a layout manager class used to arrange and display items in a linear vertically scrolling
‫list.
‫It's part of the Android Recycler View library and controls the layout and positioning of the individual
‫items within the recycler view.
‫Let's explore how the linear layout manager is used with recycler view.
‫Before I set the recycler view adapter, I need to set a linear layout manager for my recycler view.
‫I'll start with linear layout manager.
‫Layout Manager Equal to new linear layout manager.
‫And here I need to pass this as a context.
‫Here I'm creating an instance of the linear layout manager class which will handle the layout of the
‫items in a linear manner.
‫The constructor takes a context parameter and in this case you are passing this which refers to the
‫current activity.
‫The second step is recycler view dot set layout manager.
‫And here I'm specifying the linear manager.
‫This line sets the layout manager that you just created Layout manager on the recycler view.
‫By doing this, you're telling recycler view to use linear layout manager to arrange and display its
‫item with a linear layout manager in place.
‫The recycler view will now display its items in a vertically scrolling list, one item after another,
‫according to the order of items in the data set.
‫The linear layout manager also provides additional features such as supporting for items animations
‫and smooth scrolling.
‫Let's run our application and here we go.
‫These are our items of the recycler view displayed, and I need to make some changes for the layout,
‫such as the text color and the size of these images.
‫So congratulations guys.
‫We learned about recycler views.
‫Now let's move to edit some layout attributes.
‫I'll start with the recycler view here.
‫Zero here for the height to fill this to fill this space only not match.
‫So zero refers to match constraints and you run.
‫You can see all elements are displayed, but there is a space between the elements.
‫This is due to the item layout and here I miss to change it, to wrap content, wrap content run and
‫you can see all elements are displayed correctly.
‫And if you notice that all the text, the titles will end here with the same space from the right.
‫So this is due to the wrong margin that I set and margin bottom 16 DPI.
‫And you can see there is a space here.
‫Also I need to add margin top 16 DPI and you can see the image view is in the middle of this item height.
‫I need to remove this constraint and again I need to add the title constraint and here we go.
‫This is our final app.
‫I need to change the text colors.
‫Run.
‫And congratulations, guys.
‫This is our amazing application displaying items in a recycler view.