Android Studio: are there any methods to navigate to acitivty or view classes which use current xml layout?

43 views Asked by At

In visual studio and .net MVC applications, there are shortcuts to switch between views and controllers (ctrl+M+G) or between designers or form for windows applications (F7 or Shift+F7).

Is there any shortcut to navigate from XML layout editor windows to related activity/view files?

I know there might be more than one usage of an XML file in java files or there might be no usage, but I want to know are there possibly any shortcut keys for navigation?

1

There are 1 answers

1
Nitesh goyal On

@VSB in Android Studio, locate the xml file in the project view (In the Left pane). Right click the xml file and click find usage. In Mac the shortcut after selecting the xml is option + F7. Similarly windows shortcut can be found. To find the xml in the project navigator, just open the xml and then click the icon shown in the attached image. It will directly take you to the xml file in the project navigator.

enter image description here