Haşim Şemdinoğlu Haşim Şemdinoğlu - 1 year ago 85
Android Question

How to add new activity to existing project in Android Studio?

In Eclipse you just clicked the new button and select the android activity to add new activity. But Android Studio is a bit diferent; I couldn't find out how to add new activity to the project.

Answer Source

To add an Activity using Android Studio.

This step is same as adding Fragment, Service, Widget, and etc.. Screenshots provided.

[UPDATE] In Android Studio 0.5.4

  1. In your Main Application project, go to your src folder.

    enter image description here

  2. Double click the src to expand.

    enter image description here

  3. Right click main or java folder. New > Activity.

    enter image description here

[Android studio 0.5.3 and below]

  1. On your project, go to java folder (src > main) > right click either the java folder or a package name > New > Android Component.
  2. Now, the next step would be easy for you. Cheers! :)

To add a Service, Application, Remote Interface or a BroadcastReceiver, just do the same step.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download