Android Studio Tutorial

Android Studio Shortcuts (Basic)

Android Studio Shortcuts allow you to perform certain actions quickly and without much effort. Sometimes there are not many command-line keys you can press but these shortcuts make the shortcuts much easier and less frustrating. Here’s a list of the most commonly used shortcuts.

Advertisements

Android Studio Shortcuts (Basic)

Android Studio Shortcuts

1. Ctrl + Shift + A (This will bring up the ‘Action’ menu)

2. F7 (This will show you all of your references for the file you’re editing; this is especially useful if there are multiple classes that do the same thing, you want to make sure you use the correct one)

3. Ctrl + Shift + O (This will organize all your imports, making it much easier to read and understand)

4. F2 (This will allow you to rename a method or anything for that matter)

5. Alt + Enter (This is used to import missing classes or packages)

Advertisements

6. Ctrl+Shift+G(This will allow you to find classes, files or anything for that matter)

7. Alt + Shift + T (Will bring up the type hierarchy for any class you are currently editing or have selected.)

8. Ctrl+Shift+T(Another great one, this allows you to show all the methods which can be accessed on an object)

9. Ctrl+/ (This is used to comment out a line of code – very useful if you’re trying to debug something and need to use System.out.println(); without it actually being executed)

10. Ctrl+Shift+ / (Will comment out multiple lines at once – again very useful when debugging large swaths of code)

11. Alt + Enter (Will allow you to generate a setter and getter for any variable)

12. Ctrl+Shift+ F10(This will give you a popup window that allows to inspect variables, open files or check out the call stack – all very useful tools when debugging)

13. Ctrl+/ (This is used to uncomment multiple lines of code instead of having to select them and hit backspace.)

14. Ctrl+M(If you have a bunch of classes in your file which are pretty much identical other than their package names this shortcut will allow you to eliminate the redundant code and replace it with an import statement for all those classes at once. This can save a lot of time.)

15. Ctrl+O(This is used to bring up a dialog box that allows you to go through all of the files in your project and finally choose the one you want. No more scrolling through your file explorer and opening each file individually.)

16. Ctrl+Shift+ O (A helpful shortcut when working with multiple classes that do the same thing, this will let you generate an equals method for any class or interface that you have currently open.)

17. Ctrl + Shift + R(This one is great if you ever need to replace something throughout your entire project quickly – it brings up a search bar at the top which searches for anything from camel-case variables to strings containing words like ‘app’. There are many options so make sure you click ‘show all results’ before you start searching.)

18. Ctrl + Shift + T (Will allow you to search and find any class in your project – I personally use this one a lot when working on team projects because this allows me to look through my teammate’s code too without having to open it up)

19. Ctrl+Shift+(A great keyboard shortcut for customizing your Android Studio – if you ever need to switch from an Intel x86 Atom processor with no NEON support which will give you slowness while typing or have trouble finding symbols without syntax highlighting then just hit these keys and choose the new option that pops up)

20. F1(This lets you access a popup window with a list of all the keyboard shortcuts for Android Studio – sometimes we forget what they are and this is a good way to get back up and running)

Conclusion

These are the top 20 keyboard shortcuts for Android Studio, I hope you find them useful. Happy Coding 🙂

Advertisements

Leave a Reply

Your email address will not be published.

Back to top button