Android Studio TTT (tools, tips and tricks). Part 1

Here starts a list of shortcuts that I use every day (or I try to use). I hope can be useful for you, because knowing better the IDE really can speed up my development process. Quick does not mean always better, but I think we can spend the time we saved using keyboard in thinking how to do our code much better.

CMD + S = Save all
ALT + Y = Synchronize project
CTRL + R = Build & Run
CTRL + D = Debug app
CMD + F2 = Stop running app

These are personal shortcuts that I have set in the keymap menu (Settings) and I found really useful during development.

CMD + F11 = Clean project
CTRL + ALT + V = split window vertically
CTRL + ALT + X = close all split windows

Some shortcuts for refactoring,

F6 (In the project panel, selection whatever file) = Move file, triggering refactor window.
SHIFT + F6 = In variable, method change the name and refactor las apariciones con el nuevo nombre
CMD + N = open the generate menu. For instance to add constructors, getters and setters
CMD + ALT + T = If we have selected a line or block, pressing the keys open a menu to allow to wrap the line o code block in if, switch, try. 
CMD + backspace = Delete current line. Faster than select delete
CMD + B = selecting a variable and pressing the combination, the cursor moves directly to the declaration of the variable. Really handy for legacy code.
CTRL + SHIFT + RIGTH / LEFT = In open .xml file, allows as navigate between design view and text view.
CMD + / = insert line comment (pressing again in the commented line to uncomment)
CMD + ALT + / = insert block comment (pressing again in the commented line to uncomment).
CTRL + H = Open hierarchy panel. Nice to see the hierarchy of a class (also interesting for legacy code).
CMD + D = Duplicate current line or selection
F5 = In open class. Open copy pop up and allow to make a copy of the current class with other name and in other location of the project.

Shortcuts that I use for navigation between files,

CTRL + SHIFT + RIGTH / LEFT = In open .xml file, allows as navigate between design view and text view.
SHIFT + CMD + F = find in path
SHIFT + CMD + R = find in path and replace
CMD + O = Open class
CMD + SHIFT + O = Open any file
CMD + ALT + O = Open any symbol
CMD + SHIFT + [ / ] = move between tabs
CMD + W = close current tab
CTRL + F12 = navigate through the curren open file

First tool that I use in combination with the shortcuts,

ADB Idea plugin (

CTRL + SHIFT + A = open window with ADB options

Once we load some code style guide in Android Studio like Google Style Guide (, we can use this shortcut to automate the code formatting.

CMD + ALT + L = selection block of code, reformat to the selected style guide

In the next chapter, tools and plugins. To be continued…