shortcut in Android Studio to locate the current editing src file

You can use the Scroll from Source button in the Project Toolbar in the left of Android Studio.

locate

Another solution is Alt+F1+1. You can also read Locate current file in IntelliJ for more answers.


Just enable the following option!

enter image description here


For automatic scrolling, you can do following:

You need to ensure Autoscroll to Source and Autoscroll from source is enabled.

auto scroll

Whenever you change the file the Project tree will be highlighted according.

I have observed some slowness and lag if project size is big(several modules or huge code base) and you use short cut Ctrl + N to navigate to a class.

So the alternative would be to either to click following icon: icon

OR

Use keyboard shortcut:

Alt + F1 + 1 or Alt + F1 + Enter


You can add shortcut (keymap) to "reveal current editing file in project explorer" command.

  1. Press Ctrl + Alt + S, for Windows user, to open Settings
  2. Select Keymap on the sidebar
  3. Find the command using search box, type this into it: select in project view
  4. Right click the result then select Add Keyboard Shortcut
  5. Type any keyboard combination you want, for example, me prefer shortcut Ctrl + K to reveal current editing file on project explorer
  6. Click OK button. It will prompt you to remove keyboard shortcut you typed from existing command, so just click Remove button.

I'm new to android development. I used to code in Sublime Text 3. One of first thing I do to make android development feels more enjoyable is binding all shortcut I used in Sublime Text 3 to Android Studio. Now, it feels like home :)