‫Hello developers and welcome back.
‫We finished the room, the repository and the ViewModel.
‫Now let's move to create the view Open Android Studio and here inside the layout I'll create a new layout
‫resource file.
‫I'll name it as Card Underscore item.
‫This layout will act as a template for every item in the recycler view.
‫Here I change this constraint layout to the card view, and I'll add the layout tag in order to use
‫it with data binding.
‫So I'll cut it from here and paste it here okay.
‫This is our card view.
‫And move this namespace from this to here.
‫Now I'll add the card View attributes app Alt plus.
‫Enter to import the namespace for the app card Cornerradius ten dp and the card elevation equals to
‫ten dp.
‫Change the width to Matchparent and the height wrap content and set some margins margin to 14 dpi.
‫Okay, this is our card view.
‫Inside the card view, I'll create two text views inside a linear layout because I need them to be displayed
‫vertically.
‫Here I create a linear layout and inside this linear layout I'll create two text views.
‫Don't miss to set the orientation to vertical and here start creating the text views.
‫The first one with an ID named as name text view, and the second is email underscore text view.
‫And here we go.
‫This is our custom layout.
‫For every item in the recycler view be displayed as a card view.
‫Now let's move to the main activity dot XML file.
‫And here I'll use the layout tag in order to use the data binding with this file and move the namespaces
‫from here to the layout tag.
‫Inside this constraintlayout I'll create another Constraintlayout, because this outer constraintlayout
‫will contain a Constraintlayout and a RecyclerView.
‫So inside this the inner Constraintlayout I'll create two edit texts and two buttons Constraintlayout
‫attribute width as zero dpi and the height as 150 dpi.
‫The id constraint two and add the constraints.
‫So end to end of parent and the other constraints start to start off and top top of parent.
‫And inside this constraint, the inner constraint.
‫I'll create two edit texts so you can drag and drop an edit text, or simply create an edit text like
‫this.
‫Set the width like for example 150 dpi, the height wrap content and the hint as enter your name.
‫You can see this is our edit text.
‫I'll drag and drop it to here and infer the constraints 16 from top and 16 from the left.
‫I'll create another edit text.
‫I'll name it as email ET, having 150 dpi as width and wrapcontent as height.
‫ID would be email ET and the above.
‫I'll change it to name ET, and here I'll create a hint.
‫Enter your email.
‫So drag and drop this email, edit text and infer the constraints.
‫So this is good.
‫Now let's add two buttons.
‫The first button for saving or updating.
‫And the second button is for clearing all or deleting because we're going to use the same button for
‫save or delete.
‫And the second button for clear all or delete button.
‫Or you can simply create four buttons.
‫But for simplicity and making new logic and adding new algorithms for our applications, I intended
‫to use two buttons to create or to execute for functions wrap content.
‫Wrap content.
‫The ID would be button one, and I'll drag and drop it to here in further constraints.
‫And here we go.
‫Then create another button wrap content wrap content ID would be button two.
‫And in the same way I'll drag and drop this button to here and infer the constraints.
‫And under this constraint layout I'll create a recycler view.
‫So recycler view Matchparent wrap content or zero to match the constraints and the constraints button
‫to bottom of parent and top to bottom of constraint two.
‫I'll give it an ID recycler view and close it.
‫Okay so this is our layout.
‫It contains a recycler view and a constraint layout.
‫And inside this inner constraint layout we have two edit text and two buttons.
‫In the next video we're going to add the data binding with this layout.