Android – Create Layout File in Resources Layout Folder

Often times, we may need to create new layout files for different screens in our Android Application.

In this tutorial, we will learn how to create a layout file resources -> layout folder.

To create a layout file in resources folder, follow these steps.

Step 1: Open Project Explorer in Android View

Click on the Project Window, and select Android view.

ADVERTISEMENT
Step 1 - Android - Create Layout File in Resources

Step 2: Go to layout folder

In Android View, expand app node and then res node.

Step 2 - Android - Create Layout File in Resources

You should see layout node under res.

Step 3: New Layout XML File

Right click on the layout node, click on New, then XML, finally Layout XML File.

Step 3 - Android - Create Layout File in Resources

Step 4: Configure Layout XML File

When you click on the Layout XML File from the drop down menus, you will get the following window to configure the Layout XML component. Provide name to the layout. And click on Finish button.

Step 4 - Android - Create Layout File in Resources

You can also select the Root Tag from the drop down. This root tag will be created with the default values for you.

Once you click on the Finish button, if there is no layout with the name you provided, a new layout file will be created.

Conclusion

In this Kotlin Android Tutorial, we have learnt how to create a layout XML file in resources layout folder of Android project.