‫Hello, my friends.
‫Different fragments in navigation are called destinations.
‫So in order to create a new destination, we need to click on this button, new destination, and click
‫Create new destination.
‫We will select Fragment.
‫You can get all this fragments.
‫And here.
‫And we can set the name of the fragment.
‫I will name it as home fragment and the layout will be fragment, underscore home and the source code
‫will be in Kotlin.
‫And here we go.
‫This is our home fragment.
‫And in order to set it as home, we can click on this assign start destination.
‫Now, in order to edit the home fragment, we can go to the layout, of course, and we see that it's
‫creating the fragment home.
‫I need to edit.
‫This fragment.
‫I will set this text view size.
‫232 sp and I will set.
‫The text.
‫Welcome to navigation.
‫Architecture
‫component.
‫Okay app.
‫28 would be good.
‫Okay.
‫I will create.
‫New.
‫Button.
‫Here.
‫Wrap content Wrap content ID would be BTN underscore submit.
‫And.
‫The text would be submit.
‫If I drag it to here, I need to add the constraint.
‫By converting this frame layout to.
‫To a constraintlayout I can change it from here.
‫Constraint layout or I can go to the design.
‫I will click on this convert frame layout to constraint.
‫Click.
‫Okay.
‫There we go.
‫This is our.
‫Layout I can now.
‫Drag and drop things together.
‫Okay.
‫So.
‫I will add a new edit text here.
‫Edit Text.
‫The width would be matchparent.
‫The height would be wrapcontent.
‫ID would be edit text and.
‫Hint will be.
‫Enter your name.
‫Okay.
‫I will drag it to here.
‫I will add the constraints.
‫The constraints like this.
‫And here.
‫We go.
‫Okay, I will make some margin 12 DPI.
‫It's good.
‫Okay.
‫Margin top.
‫Now.
‫I can go to this submit button and add.
‫A constraint to it.
‫Drag it down and everything is working fine.
‫If we run the program now.
‫We can see.
‫And here we go.
‫This is our home fragment.
‫Now, I will add.
‫The layout tag here because we're going to use the data binding library and I will add them to the outermost
‫tags and the namespaces.
‫I will move them to the layout tag.
‫Okay.
‫In this way.
‫We finished designing our fragment home.
‫Layout.