King_Nothing
King_Nothing

Reputation: 480

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

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

Upvotes: 23

Views: 46640

Answers (2)

Nitesh Khosla
Nitesh Khosla

Reputation: 875

  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

Upvotes: 4

Flynn
Flynn

Reputation: 6181

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

Upvotes: 45

Related Questions