lol2dubs
lol2dubs

Reputation: 77

Does new activity need content and activity xml?

Since the latest changes, the main activity has an activity_main.xml and a content_main.xml.

I'm creating a new activity now in the same project but no matter how I create it, I can't get Android Studio to create both xml files for the new activity. This means that I can't remove the toolbar unless I do so programmatically. That's fine by me.

Ultimately, I'm just wondering if I should create both xml files for the second activity.... like:

activity_notmain.xml content_notmain.xml

or should I just create the one layout file and remove the toolbar programmatically?

Upvotes: 0

Views: 1589

Answers (1)

Amir Panahandeh
Amir Panahandeh

Reputation: 9039

just right click on res>layout and go to new>activity>blank activity then enter name for activity and layout file it will automatically create both activity and content xml file

Upvotes: 2

Related Questions