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

前端 未结 5 707
天命终不由人
天命终不由人 2020-11-29 02:16

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 act

5条回答
  •  Happy的楠姐
    2020-11-29 02:56

    I think natually do it is straightforward, whether Intellij IDEA or Android Studio, I always click new Java class menu, and then typing the class name, press Enter to create. after that, I manually typing "extends Activity" in the class file, and then import the class by shortcut key. finally, I also manually override the onCreate() method and invoke the setContentView() method.

提交回复
热议问题