How to run a certain activity in Android Studio?

后端 未结 6 1144
渐次进展
渐次进展 2021-02-04 01:31

For instance, I have a few activities within one app, and in order to see a certain activity\'s UI or whatever, I need to run a certain activity that is not the launcher of the

6条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-04 01:55

    I am using Android Studio stable version 2.1.2 and there is one shortcut to do so. Just open the activity class you wish to run and right click on coding area, There is options to run and debug the particular activity as shown in below screen shot.

    For windows use shortcut ctrl+shift+F10 and for mac use ctrl+shift+R. I have tested this in emulator and its working fine, didn't test in actual device.Works only for activity class and don't forget to put cursor in coding area by clicking on it. Also I am not aware whether this option available in older Android studio versions less than 2.1.2.

提交回复
热议问题