‫Welcome back.
‫I created an empty project.
‫Empty views activity in Android Studio called Grocery Application.
‫Now let's design the layout of this application.
‫I'll start by changing the background of this constraintlayout and I'll set it to this color.
‫This is good and I remove this text view.
‫This layout contains image view and a recycler view.
‫So I'll start with the image view that will act as a header.
‫I'll copy this from my desktop, these assets, and you can download them from the resources folder
‫under this section.
‫I'll copy them and move to Android Studio.
‫Go to drawables and paste it here.
‫Click okay and make sure that all the images start with small letters.
‫Okay, it's very simple.
‫Now I'll use this image as an image src and resource.
‫So double header and you can see it.
‫This is our image view.
‫Now I'll add constraints and to end of parent start to start of parent and top to top I'm linking it
‫to the top of parent okay this is our header.
‫Now I'll create our recycler view Matchparent.
‫And the height is zero dpi.
‫Following the constraints.
‫And you can see it.
‫Here is our recycler view.
‫I'll add the constraints to link it under the header image I'll add an id RecyclerView background would
‫be the same color.
‫I'll add the constraints and margin.
‫Also, you can drag and drop it and add the constraints visually.
‫This is our layout, this is our header and this is our recycler view.
‫But wait what is Recycler view?
‫Recycler view is a UI user interface component in Android that is used to display a scrollable list
‫or grid of elements.
‫It's a more flexible and advanced version of the older list view and the grid view components, and
‫is part of Android X library.
‫The primary purpose of Recycler View is to efficiently display large data sets of items by recycling
‫and reusing views as the user scrolls through the list.
‫This recycling mechanism makes it more memory efficient compared to list views, grid views, and other
‫UI components.
‫Now let's design the layout for each item that we're going to display in this recycler view.