How to create a new layout for an Android project (using Eclipse)-ThrowExceptions

Exception or error:

I think this is a fairly straightforward question but I have not been able to find an answer after some searching. I am new to Android development. I am using Eclipse and have ADT installed.

I just wanted to know if the IDE has a feature that will allow me to easily add a new layout file to my project.

At the moment I am manually adding a file to the project and calling it something like mynewlayout.xml and then manually copying the xml from the default layout (added to new Android projects). I would like to find out if it is possible to create a new layout through the IDE like you would create a new activity (by selecting AndroidManifest.xml and choosing the Application tab).

Thanks

How to solve:

Go to file – new – other – Android – android XML Layout

###

  1. Right click on the layout.
  2. Then New
  3. Then click on the android xml file.
  4. Name of file like rossman.xml
  5. Click finish

Leave a Reply

Your email address will not be published. Required fields are marked *