‫In this video, we will design the layout for the notes.
‫So I will create inside the layout folder a new layout resource file.
‫I will name it as note.
‫Eight or note layout.
‫Click.
‫Okay.
‫And this is our layout.
‫I will go to here and start adding the card view.
‫Which is match parent match parent and the ID would be card view.
‫The background would be white and the margin would be.
‫Eight.
‫The pea and the card elevation.
‫Equal to eight deep and the corner radius would be five DP.
‫Then we will move inside this cardview to create a linear lane linear layout.
‫I will make match Parent.
‫Match Parent.
‫I will make the orientation would be vertical padding.
‫Equal 16 DP.
‫Okay.
‫Inside this linear layout, I will create another linear layout.
‫So this linear layout.
‫Linear layout.
‫Width would be matchparent.
‫Height would be wrapcontent.
‫The ID would be TV note title.
‫The weight would be.
‫By the way, we've we've talked about all of these attributes in the previous.
‫Uh, videos and the first videos of this course.
‫So text would be or the linear layout here.
‫I'm sorry.
‫I need to change it here to linear to ID.
‫I will remove this weight.
‫I will add it.
‫Gravity.
‫Without the weight, it will be a center and the orientation would be horizontal.
‫Inside this linear layout, I will add a text view and a view.
‫So I will start with the first text view.
‫I will give it a width.
‫Matchparent.
‫The height would be wrap content id would be note.
‫Title text view which.
‫Which means text view the weight 200 and the color would be black.
‫The text would be note title.
‫And the style would be.
‫Text style would be bold and.
‫Size would be 20 sp.
‫Okay.
‫This is the first text view, the second widget that I will need.
‫I will add it inside this linear layout, the first, the second linear layout or the inner linear layout.
‫I will make it as a view.
‫So this is the view.
‫I will give it a width ten dpi.
‫It will be like a separation between the widgets and the ID would be IB underscore color, the weight
‫would be.
‫One.
‫And margin and.
‫Would be eight deep.
‫Gravity would be center.
‫And we finished The View.
‫We finished this linear layout, I will collapse it.
‫And outside this linear layout I will create a text view.
‫So.
‫It will have a match.
‫Match a parent and wrapcontent for the height.
‫And this text view.
‫Will be an ID, TV note body and margin top.
‫16 DP height.
‫Maximum height would be 170 DP.
‫In order not to increase more than 170 DP, the text would be type.
‫Something.
‫You can see it appears in the preview.
‫To the right text size would be 16 SP The color would be.
‫I prefer black.
‫Okay, so this is our text view.
‫The second text view that it is included in the outer linear layout.
‫And this is the linear layout that contains a text view and a view.
‫You can see there is a separation here.
‫So this is the layout for our card view items.