‫In this video, we'll start designing the layout for our activities and fragments.
‫So first of all, I will add inside the resources folder.
‫I will create a new Android resource file.
‫I will name it as nav graph and I will give it a navigation resource type click okay and it will create
‫for you navigation folder with nav graph XML.
‫Okay.
‫And we've seen this file in the previous.
‫Section when talking about the navigation component.
‫Now let's move to the main activity.
‫For a layout.
‫I will remove this.
‫Text of you and I will go to the containers.
‫I will drag and drop nav host fragment.
‫So the first step is to create the nav nav graph.
‫The second fragment is to create the nav host fragment, select nav graph, and click okay.
‫And here we go.
‫If we go to the split mode, you can see that Android x dot fragment dot app dot fragment container
‫view tag is added and here is a special type of fragments.
‫Okay, so if I go back to the nav graph, you can see that this container is added.
‫Directly now.
‫I will start adding the fragments.
‫So the fragments which are which represent destinations, I will start adding them.
‫Click on this new destination.
‫Create new destination.
‫Select this empty fragment.
‫Blank fragment.
‫I will name it as home fragment.
‫Click.
‫Okay.
‫And here we go.
‫I will create another destination.
‫Click.
‫In the same way.
‫I will name it as.
‫New note fragment.
‫Click.
‫Okay.
‫And here we go.
‫This is our new note fragment.
‫I will click another or create a new destination in the same way I will create the same.
‫Way than a fragment name called Update.
‫Note Fragment.
‫Click enter.
‫And here we go.
‫We have three fragments, a home fragment, new node fragment and update.
‫Node fragment.