How can i find where a method or a variable is used in Android Studio (shortcut) How can i find where a method or a variable is used in Android Studio (shortcut) android android

How can i find where a method or a variable is used in Android Studio (shortcut)


In Android Studio, highlight the method and either right click > Find usages or use the Alt+F7 shortcut.

Edit: Ctrl+left click on a method is useful for finding where that method was initially declared


For Ubuntu users:

For me Alt+F7 has not worked,so I've solved the conflict by going to the

Ubuntu System settings-> keyboard -> shortcuts

and changing Alt+F7 in there with another combination.

And now it's working ))


Just click on the method or variable and any usages will be highlighted and on the scroll bar on the right side of your code you will see gray bars appear, those are the usages of the current highlighted (or clicked on) variable or method within your code.