‫Welcome back!
‫The layout folder is a crucial directory within the resources directory of an Android project.
‫It's used to store Xaml layout files that define the structure and arrangement of user interface elements
‫for different screens and activities.
‫In your Android project, each XML file corresponds to a different screen or layout.
‫In your application.
‫I'll create a new layout resource file and I'll name it as Alternative Layout.
‫Click okay.
‫And here I created a new layout file inside the layout folder.
‫This is our new layout.
‫This layout.
‫It will contain only one text view.
‫And here we go.
‫This is our layout.
‫Add the constraints.
‫Let's move to the main activity.
‫In this application we have two layout files.
‫Inside the layout folder we have activity underscore main dot XML file.
‫And this is the layout and the alternative layout.
‫And this is the layout of this file.
‫If I go to the main activity this is the Oncreate method.
‫Inside this Oncreate method we have the Setcontentview method.
‫This method is used to set the content view of the activity to the layout defined in the Xaml file,
‫specified by the resource ID or dot layout.
‫Dot activity underscore main AR is a class generated by Android build system that contains references
‫to all resources in your project.
‫The layout directory in AR contains references to example layout files.
‫So if I change activity, underscore, main, or remove it control and space I can get activity underscore
‫main and the alternative layout.
‫These are the two files two layout files defined in the layout folder.
‫So these are the references of these two files I'll use alternative layout if I run the project now
‫and you can see our application main layout is set to this alternative layout using the Setcontentview.
‫If I switch it back to activity underscore main, run the application and you can see this is our second
‫layout.
‫Layout folder is used to store Xaml layout files that define the structure and arrangement of user interface
‫elements for different activities in your Android application.